Update serde_derive to tool attrs

This commit is contained in:
David Tolnay 2020-04-05 21:00:52 -07:00
parent d1564525ad
commit 1b35c9e27e
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 29 additions and 38 deletions

View File

@ -21,9 +21,7 @@ pub fn wrap_in_const(
use #path as _serde; use #path as _serde;
}, },
None => quote! { None => quote! {
#[allow(unknown_lints)] #[allow(rust_2018_idioms, clippy::useless_attribute)]
#[cfg_attr(feature = "cargo-clippy", allow(useless_attribute))]
#[allow(rust_2018_idioms)]
extern crate serde as _serde; extern crate serde as _serde;
}, },
}; };

View File

@ -15,44 +15,37 @@
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.106")] #![doc(html_root_url = "https://docs.rs/serde_derive/1.0.106")]
#![allow(unknown_lints, bare_trait_objects)] #![allow(unknown_lints, bare_trait_objects)]
#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))] #![deny(clippy::all, clippy::pedantic)]
#![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))]
// Ignored clippy lints // Ignored clippy lints
#![cfg_attr( #![allow(
feature = "cargo-clippy", clippy::cognitive_complexity,
allow( clippy::enum_variant_names,
cognitive_complexity, clippy::needless_pass_by_value,
enum_variant_names, clippy::redundant_field_names,
needless_pass_by_value, clippy::too_many_arguments,
redundant_field_names, clippy::trivially_copy_pass_by_ref,
too_many_arguments, clippy::used_underscore_binding,
trivially_copy_pass_by_ref, clippy::wildcard_in_or_patterns
used_underscore_binding,
wildcard_in_or_patterns,
)
)] )]
// Ignored clippy_pedantic lints // Ignored clippy_pedantic lints
#![cfg_attr( #![allow(
feature = "cargo-clippy", clippy::cast_possible_truncation,
allow( clippy::checked_conversions,
cast_possible_truncation, clippy::doc_markdown,
checked_conversions, clippy::enum_glob_use,
doc_markdown, clippy::filter_map,
enum_glob_use, clippy::indexing_slicing,
filter_map, clippy::items_after_statements,
indexing_slicing, clippy::match_same_arms,
items_after_statements, clippy::module_name_repetitions,
match_same_arms, clippy::must_use_candidate,
module_name_repetitions, clippy::similar_names,
must_use_candidate, clippy::single_match_else,
similar_names, clippy::struct_excessive_bools,
single_match_else, clippy::too_many_lines,
struct_excessive_bools, clippy::unseparated_literal_suffix,
too_many_lines, clippy::use_self,
unseparated_literal_suffix, clippy::wildcard_imports
use_self,
wildcard_imports,
)
)] )]
// The `quote!` macro requires deep recursion. // The `quote!` macro requires deep recursion.
#![recursion_limit = "512"] #![recursion_limit = "512"]