chore: Silence unexpected cfg warnings

These are all coming from macro invocations of macros that are defined
in other crates. It's likely a clippy issue. We should try to revert
this the next time we bump the nightly version we're using.
This commit is contained in:
Damir Jelić
2024-11-27 12:17:23 +01:00
parent bb598b61a5
commit dcf6af405d
11 changed files with 16 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
// TODO: target-os conditional would be good.
#![allow(unused_qualifications, clippy::new_without_default)]
#![allow(clippy::empty_line_after_doc_comments)] // Needed because uniffi macros contain empty
// lines after docs.
mod authentication;
mod chunk_iterator;

View File

@@ -16,6 +16,7 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(target_arch = "wasm32", allow(clippy::arc_with_non_send_sync))]
#![cfg_attr(test, allow(unexpected_cfgs))] // Triggered by the init_tracing_for_tests!() invocation.
#![warn(missing_docs, missing_debug_implementations)]
pub use matrix_sdk_common::*;

View File

@@ -1,4 +1,5 @@
#![allow(clippy::assign_op_pattern)] // triggered by bitflags! usage
#![allow(clippy::assign_op_pattern)] // Triggered by bitflags! usage
#![allow(unexpected_cfgs)] // Triggered by the `EventContent` macro usage
mod members;
pub(crate) mod normal;

View File

@@ -17,6 +17,7 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![warn(missing_docs, missing_debug_implementations)]
#![cfg_attr(target_arch = "wasm32", allow(clippy::arc_with_non_send_sync))]
#![cfg_attr(test, allow(unexpected_cfgs))] // Triggered by the init_tracing_for_tests!() invocation.
pub mod backups;
mod ciphers;

View File

@@ -15,6 +15,7 @@
not(any(feature = "state-store", feature = "crypto-store", feature = "event-cache")),
allow(dead_code, unused_imports)
)]
#![cfg_attr(test, allow(unexpected_cfgs))] // Triggered by the init_tracing_for_tests!() invocation.
#[cfg(feature = "crypto-store")]
mod crypto_store;

View File

@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![cfg_attr(test, allow(unexpected_cfgs))] // Triggered by the init_tracing_for_tests!() invocation.
use ruma::html::HtmlSanitizerMode;
mod events;

View File

@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(unexpected_cfgs)] // Triggered by the init_tracing_for_tests!() invocation.
use itertools::Itertools as _;
use matrix_sdk::deserialized_responses::TimelineEvent;
use ruma::{events::AnyStateEvent, serde::Raw, EventId, RoomId};

View File

@@ -17,6 +17,7 @@
#![warn(missing_debug_implementations, missing_docs)]
#![cfg_attr(target_arch = "wasm32", allow(clippy::arc_with_non_send_sync))]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(test, allow(unexpected_cfgs))] // Triggered by the init_tracing_for_tests!() invocation.
pub use async_trait::async_trait;
pub use bytes;

View File

@@ -1,6 +1,6 @@
// The http mocking library is not supported for wasm32
#![cfg(not(target_arch = "wasm32"))]
#![allow(unexpected_cfgs)] // Triggered by the init_tracing_for_tests!() invocation.
use matrix_sdk::{config::SyncSettings, test_utils::logged_in_client_with_server, Client};
use matrix_sdk_test::test_json;
use serde::Serialize;

View File

@@ -1,3 +1,5 @@
#![allow(unexpected_cfgs)] // Triggered by the `EventContent` macro usage
///
/// This is an example showcasing how to build a very simple bot with custom
/// events using the matrix-sdk. To try it, you need a rust build setup, then

View File

@@ -1,4 +1,5 @@
#![cfg(test)]
#![allow(unexpected_cfgs)] // Triggered by the init_tracing_for_tests!() invocation.
matrix_sdk_test::init_tracing_for_tests!();