diff --git a/lib/api/src/lib.rs b/lib/api/src/lib.rs index fe6f928f649..0f2ed2d5b9a 100644 --- a/lib/api/src/lib.rs +++ b/lib/api/src/lib.rs @@ -9,21 +9,15 @@ rustdoc::broken_intra_doc_links )] #![warn(unused_import_braces)] -#![cfg_attr( - feature = "cargo-clippy", - allow(clippy::new_without_default, clippy::vtable_address_comparisons) -)] -#![cfg_attr( - feature = "cargo-clippy", - warn( - clippy::float_arithmetic, - clippy::mut_mut, - clippy::nonminimal_bool, - clippy::map_unwrap_or, - clippy::print_stdout, - clippy::unicode_not_nfc, - clippy::use_self - ) +#![allow(clippy::new_without_default, clippy::vtable_address_comparisons)] +#![warn( + clippy::float_arithmetic, + clippy::mut_mut, + clippy::nonminimal_bool, + clippy::map_unwrap_or, + clippy::print_stdout, + clippy::unicode_not_nfc, + clippy::use_self )] #![allow(deprecated_cfg_attr_crate_type_name)] #![cfg_attr(feature = "js", crate_type = "cdylib")] diff --git a/lib/cache/src/lib.rs b/lib/cache/src/lib.rs index b15503e8464..d988a65c4ef 100644 --- a/lib/cache/src/lib.rs +++ b/lib/cache/src/lib.rs @@ -3,18 +3,15 @@ #![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)] #![warn(unused_import_braces)] -#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))] -#![cfg_attr( - feature = "cargo-clippy", - warn( - clippy::float_arithmetic, - clippy::mut_mut, - clippy::nonminimal_bool, - clippy::map_unwrap_or, - clippy::print_stdout, - clippy::unicode_not_nfc, - clippy::use_self - ) +#![allow(clippy::new_without_default)] +#![warn( + clippy::float_arithmetic, + clippy::mut_mut, + clippy::nonminimal_bool, + clippy::map_unwrap_or, + clippy::print_stdout, + clippy::unicode_not_nfc, + clippy::use_self )] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/lib/compiler-cranelift/src/lib.rs b/lib/compiler-cranelift/src/lib.rs index bb644035c76..042537ec10b 100644 --- a/lib/compiler-cranelift/src/lib.rs +++ b/lib/compiler-cranelift/src/lib.rs @@ -6,21 +6,15 @@ //! Compared to LLVM, Cranelift is a bit faster and made entirely in Rust. #![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)] #![warn(unused_import_braces)] -#![cfg_attr( - feature = "cargo-clippy", - allow(clippy::new_without_default, clippy::new_without_default) -)] -#![cfg_attr( - feature = "cargo-clippy", - warn( - clippy::float_arithmetic, - clippy::mut_mut, - clippy::nonminimal_bool, - clippy::map_unwrap_or, - clippy::print_stdout, - clippy::unicode_not_nfc, - clippy::use_self - ) +#![allow(clippy::new_without_default, clippy::new_without_default)] +#![warn( + clippy::float_arithmetic, + clippy::mut_mut, + clippy::nonminimal_bool, + clippy::map_unwrap_or, + clippy::print_stdout, + clippy::unicode_not_nfc, + clippy::use_self )] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/lib/compiler-cranelift/src/translator/code_translator.rs b/lib/compiler-cranelift/src/translator/code_translator.rs index d68d3ced6e7..1de3e352fec 100644 --- a/lib/compiler-cranelift/src/translator/code_translator.rs +++ b/lib/compiler-cranelift/src/translator/code_translator.rs @@ -99,10 +99,7 @@ use wasmer_types::{ }; // Clippy warns about "align: _" but its important to document that the align field is ignored -#[cfg_attr( - feature = "cargo-clippy", - allow(clippy::unneeded_field_pattern, clippy::cognitive_complexity) -)] +#[allow(clippy::unneeded_field_pattern, clippy::cognitive_complexity)] /// Translates wasm operators into Cranelift IR instructions. Returns `true` if it inserted /// a return. pub fn translate_operator( @@ -2106,7 +2103,7 @@ pub fn translate_operator( } // Clippy warns us of some fields we are deliberately ignoring -#[cfg_attr(feature = "cargo-clippy", allow(clippy::unneeded_field_pattern))] +#[allow(clippy::unneeded_field_pattern)] /// Deals with a Wasm instruction located in an unreachable portion of the code. Most of them /// are dropped but special ones like `End` or `Else` signal the potential end of the unreachable /// portion so the translation state must be updated accordingly. diff --git a/lib/compiler-cranelift/src/translator/func_environ.rs b/lib/compiler-cranelift/src/translator/func_environ.rs index d863fa6baf3..0f6215ff037 100644 --- a/lib/compiler-cranelift/src/translator/func_environ.rs +++ b/lib/compiler-cranelift/src/translator/func_environ.rs @@ -164,7 +164,7 @@ pub trait FuncEnvironment: TargetEnvironment { /// The signature `sig_ref` was previously created by `make_indirect_sig()`. /// /// Return the call instruction whose results are the WebAssembly return values. - #[cfg_attr(feature = "cargo-clippy", allow(clippy::too_many_arguments))] + #[allow(clippy::too_many_arguments)] fn translate_call_indirect( &mut self, pos: FuncCursor, diff --git a/lib/compiler/src/lib.rs b/lib/compiler/src/lib.rs index ba4624bd457..d8211b352f4 100644 --- a/lib/compiler/src/lib.rs +++ b/lib/compiler/src/lib.rs @@ -8,21 +8,15 @@ #![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)] #![warn(unused_import_braces)] #![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr( - feature = "cargo-clippy", - allow(clippy::new_without_default, clippy::upper_case_acronyms) -)] -#![cfg_attr( - feature = "cargo-clippy", - warn( - clippy::float_arithmetic, - clippy::mut_mut, - clippy::nonminimal_bool, - clippy::map_unwrap_or, - clippy::print_stdout, - clippy::unicode_not_nfc, - clippy::use_self - ) +#![allow(clippy::new_without_default, clippy::upper_case_acronyms)] +#![warn( + clippy::float_arithmetic, + clippy::mut_mut, + clippy::nonminimal_bool, + clippy::map_unwrap_or, + clippy::print_stdout, + clippy::unicode_not_nfc, + clippy::use_self )] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/lib/object/src/lib.rs b/lib/object/src/lib.rs index e14f6051202..946101e966e 100644 --- a/lib/object/src/lib.rs +++ b/lib/object/src/lib.rs @@ -5,18 +5,15 @@ #![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)] #![warn(unused_import_braces)] -#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))] -#![cfg_attr( - feature = "cargo-clippy", - warn( - clippy::float_arithmetic, - clippy::mut_mut, - clippy::nonminimal_bool, - clippy::map_unwrap_or, - clippy::print_stdout, - clippy::unicode_not_nfc, - clippy::use_self - ) +#![allow(clippy::new_without_default)] +#![warn( + clippy::float_arithmetic, + clippy::mut_mut, + clippy::nonminimal_bool, + clippy::map_unwrap_or, + clippy::print_stdout, + clippy::unicode_not_nfc, + clippy::use_self )] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/lib/types/src/lib.rs b/lib/types/src/lib.rs index fec6127d45d..db01db3d124 100644 --- a/lib/types/src/lib.rs +++ b/lib/types/src/lib.rs @@ -7,18 +7,15 @@ #![deny(missing_docs, unused_extern_crates)] #![warn(unused_import_braces)] #![cfg_attr(not(feature = "std"), no_std)] -#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))] -#![cfg_attr( - feature = "cargo-clippy", - warn( - clippy::float_arithmetic, - clippy::mut_mut, - clippy::nonminimal_bool, - clippy::map_unwrap_or, - clippy::print_stdout, - clippy::unicode_not_nfc, - clippy::use_self - ) +#![allow(clippy::new_without_default)] +#![warn( + clippy::float_arithmetic, + clippy::mut_mut, + clippy::nonminimal_bool, + clippy::map_unwrap_or, + clippy::print_stdout, + clippy::unicode_not_nfc, + clippy::use_self )] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/lib/vm/src/lib.rs b/lib/vm/src/lib.rs index b361a62f9b5..3ae29ea05a9 100644 --- a/lib/vm/src/lib.rs +++ b/lib/vm/src/lib.rs @@ -3,21 +3,15 @@ #![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)] #![deny(trivial_numeric_casts, unused_extern_crates)] #![warn(unused_import_braces)] -#![cfg_attr( - feature = "cargo-clippy", - allow(clippy::new_without_default, clippy::vtable_address_comparisons) -)] -#![cfg_attr( - feature = "cargo-clippy", - warn( - clippy::float_arithmetic, - clippy::mut_mut, - clippy::nonminimal_bool, - clippy::map_unwrap_or, - clippy::print_stdout, - clippy::unicode_not_nfc, - clippy::use_self - ) +#![allow(clippy::new_without_default, clippy::vtable_address_comparisons)] +#![warn( + clippy::float_arithmetic, + clippy::mut_mut, + clippy::nonminimal_bool, + clippy::map_unwrap_or, + clippy::print_stdout, + clippy::unicode_not_nfc, + clippy::use_self )] #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] diff --git a/tests/lib/wast/src/lib.rs b/tests/lib/wast/src/lib.rs index 54e38db3300..30c5b8381ce 100644 --- a/tests/lib/wast/src/lib.rs +++ b/tests/lib/wast/src/lib.rs @@ -2,18 +2,15 @@ #![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)] #![warn(unused_import_braces)] -#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))] -#![cfg_attr( - feature = "cargo-clippy", - warn( - clippy::float_arithmetic, - clippy::mut_mut, - clippy::nonminimal_bool, - clippy::map_unwrap_or, - clippy::print_stdout, - clippy::unicode_not_nfc, - clippy::use_self - ) +#![allow(clippy::new_without_default)] +#![warn( + clippy::float_arithmetic, + clippy::mut_mut, + clippy::nonminimal_bool, + clippy::map_unwrap_or, + clippy::print_stdout, + clippy::unicode_not_nfc, + clippy::use_self )] mod error;