Merge pull request #2548 from dtolnay/toolattr

Adopt tool attrs for clippy lint level attributes
This commit is contained in:
David Tolnay
2023-07-31 11:48:33 -07:00
committed by GitHub
+32 -36
View File
@@ -102,55 +102,51 @@
// https://github.com/serde-rs/serde/issues/812 // https://github.com/serde-rs/serde/issues/812
#![cfg_attr(feature = "unstable", feature(error_in_core, never_type))] #![cfg_attr(feature = "unstable", feature(error_in_core, never_type))]
#![allow(unknown_lints, bare_trait_objects, deprecated)] #![allow(unknown_lints, bare_trait_objects, deprecated)]
#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))]
// Ignored clippy and clippy_pedantic lints // Ignored clippy and clippy_pedantic lints
#![cfg_attr( #![allow(
feature = "cargo-clippy",
allow(
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/5704 // clippy bug: https://github.com/rust-lang/rust-clippy/issues/5704
unnested_or_patterns, clippy::unnested_or_patterns,
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/7768 // clippy bug: https://github.com/rust-lang/rust-clippy/issues/7768
semicolon_if_nothing_returned, clippy::semicolon_if_nothing_returned,
// not available in our oldest supported compiler // not available in our oldest supported compiler
empty_enum, clippy::empty_enum,
type_repetition_in_bounds, // https://github.com/rust-lang/rust-clippy/issues/8772 clippy::type_repetition_in_bounds, // https://github.com/rust-lang/rust-clippy/issues/8772
// integer and float ser/de requires these sorts of casts // integer and float ser/de requires these sorts of casts
cast_possible_truncation, clippy::cast_possible_truncation,
cast_possible_wrap, clippy::cast_possible_wrap,
cast_sign_loss, clippy::cast_sign_loss,
// things are often more readable this way // things are often more readable this way
cast_lossless, clippy::cast_lossless,
module_name_repetitions, clippy::module_name_repetitions,
option_if_let_else, clippy::option_if_let_else,
single_match_else, clippy::single_match_else,
type_complexity, clippy::type_complexity,
use_self, clippy::use_self,
zero_prefixed_literal, clippy::zero_prefixed_literal,
// correctly used // correctly used
derive_partial_eq_without_eq, clippy::derive_partial_eq_without_eq,
enum_glob_use, clippy::enum_glob_use,
explicit_auto_deref, clippy::explicit_auto_deref,
let_underscore_untyped, clippy::let_underscore_untyped,
map_err_ignore, clippy::map_err_ignore,
new_without_default, clippy::new_without_default,
result_unit_err, clippy::result_unit_err,
wildcard_imports, clippy::wildcard_imports,
// not practical // not practical
needless_pass_by_value, clippy::needless_pass_by_value,
similar_names, clippy::similar_names,
too_many_lines, clippy::too_many_lines,
// preference // preference
doc_markdown, clippy::doc_markdown,
unseparated_literal_suffix, clippy::unseparated_literal_suffix,
// false positive // false positive
needless_doctest_main, clippy::needless_doctest_main,
// noisy // noisy
missing_errors_doc, clippy::missing_errors_doc,
must_use_candidate, clippy::must_use_candidate,
)
)] )]
// Restrictions // Restrictions
#![cfg_attr(feature = "cargo-clippy", deny(question_mark_used))] #![deny(clippy::question_mark_used)]
// Rustc lints. // Rustc lints.
#![deny(missing_docs, unused_imports)] #![deny(missing_docs, unused_imports)]