Merge pull request #2535 from dtolnay/baretrait

Restore bare_trait_objects lint within serde_derive code
This commit is contained in:
David Tolnay 2023-07-26 14:26:02 -07:00 committed by GitHub
commit ad94aed753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 4 deletions

View File

@ -14,7 +14,6 @@
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.176")]
#![allow(unknown_lints, bare_trait_objects)]
#[cfg(not(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu")))]
include!("lib_from_source.rs");

View File

@ -119,7 +119,7 @@ impl<'a> Container<'a> {
}
impl<'a> Data<'a> {
pub fn all_fields(&'a self) -> Box<Iterator<Item = &'a Field<'a>> + 'a> {
pub fn all_fields(&'a self) -> Box<dyn Iterator<Item = &'a Field<'a>> + 'a> {
match self {
Data::Enum(variants) => {
Box::new(variants.iter().flat_map(|variant| variant.fields.iter()))

View File

@ -14,7 +14,6 @@
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.176")]
#![allow(unknown_lints, bare_trait_objects)]
// Ignored clippy lints
#![allow(
// clippy false positive: https://github.com/rust-lang/rust-clippy/issues/7054

View File

@ -1,5 +1,4 @@
#![doc(html_root_url = "https://docs.rs/serde_derive_internals/0.28.0")]
#![allow(unknown_lints, bare_trait_objects)]
// Ignored clippy lints
#![allow(
clippy::cognitive_complexity,