From db47f80d82c1b13da063683736ddd444b26697e2 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Tue, 20 Feb 2024 20:25:31 +0100 Subject: [PATCH 1/4] Move some lints into the workspace lint table --- Cargo.toml | 15 +++++++++++++++ serde_with/src/lib.rs | 16 ---------------- serde_with/tests/hashbrown_0_14.rs | 2 +- serde_with/tests/indexmap_1.rs | 2 +- serde_with/tests/indexmap_2.rs | 2 +- serde_with/tests/rust.rs | 4 ++-- serde_with/tests/schemars_0_8.rs | 6 +++--- serde_with/tests/utils.rs | 2 +- serde_with/tests/version_numbers.rs | 2 +- serde_with_macros/src/lib.rs | 15 +-------------- serde_with_macros/tests/skip_serializing_null.rs | 6 ++++++ 11 files changed, 32 insertions(+), 40 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d7171b94..add223ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,8 +24,17 @@ sign-tag = true tag = false [workspace.lints.rust] +missing_docs = "warn" +rust_2018_idioms = "warn" +trivial_casts = "warn" +trivial_numeric_casts = "warn" +unused_extern_crates = "warn" +unused_import_braces = "warn" +unused_qualifications = "warn" +variant_size_differences = "warn" [workspace.lints.clippy] +# alloc_instead_of_core = "warn" # Checks for usage of `cloned()` on an `Iterator` or `Option` where `copied()` could be used instead. cloned_instead_of_copied = "warn" # Checks for literal calls to `Default::default()`. @@ -35,3 +44,9 @@ default_trait_access = "warn" # doc_markdown = "warn" # Checks for closures which only invoke a method on the closure argument and can be replaced by referencing the method directly. redundant_closure_for_method_calls = "warn" +semicolon_if_nothing_returned = "warn" +# std_instead_of_core = "warn" +# std_instead_of_alloc = "warn" + +[workspace.lints.rustdoc] +missing_crate_level_docs = "warn" diff --git a/serde_with/src/lib.rs b/serde_with/src/lib.rs index e0c8e7ce..2ac6019e 100644 --- a/serde_with/src/lib.rs +++ b/serde_with/src/lib.rs @@ -1,19 +1,3 @@ -#![warn( - clippy::semicolon_if_nothing_returned, - // New clippy lints, not yet stable - // clippy::std_instead_of_core, - // clippy::std_instead_of_alloc, - // clippy::alloc_instead_of_core, - missing_docs, - rust_2018_idioms, - rustdoc::missing_crate_level_docs, - trivial_casts, - trivial_numeric_casts, - unused_extern_crates, - unused_import_braces, - unused_qualifications, - variant_size_differences, -)] #![doc(test(attr(forbid(unsafe_code))))] #![doc(test(attr(deny( missing_debug_implementations, diff --git a/serde_with/tests/hashbrown_0_14.rs b/serde_with/tests/hashbrown_0_14.rs index 7a416276..6f3e1d01 100644 --- a/serde_with/tests/hashbrown_0_14.rs +++ b/serde_with/tests/hashbrown_0_14.rs @@ -235,7 +235,7 @@ fn duplicate_value_last_wins_hashset() { where H: std::hash::Hasher, { - self.0.hash(state) + self.0.hash(state); } } diff --git a/serde_with/tests/indexmap_1.rs b/serde_with/tests/indexmap_1.rs index fcd268f3..58e4c976 100644 --- a/serde_with/tests/indexmap_1.rs +++ b/serde_with/tests/indexmap_1.rs @@ -195,7 +195,7 @@ fn duplicate_value_last_wins_indexset() { where H: std::hash::Hasher, { - self.0.hash(state) + self.0.hash(state); } } diff --git a/serde_with/tests/indexmap_2.rs b/serde_with/tests/indexmap_2.rs index 0207846b..350a94c2 100644 --- a/serde_with/tests/indexmap_2.rs +++ b/serde_with/tests/indexmap_2.rs @@ -195,7 +195,7 @@ fn duplicate_value_last_wins_indexset() { where H: std::hash::Hasher, { - self.0.hash(state) + self.0.hash(state); } } diff --git a/serde_with/tests/rust.rs b/serde_with/tests/rust.rs index 9b3efeff..8dfa91cb 100644 --- a/serde_with/tests/rust.rs +++ b/serde_with/tests/rust.rs @@ -218,7 +218,7 @@ fn duplicate_value_first_wins_hashset() { where H: std::hash::Hasher, { - self.0.hash(state) + self.0.hash(state); } } @@ -279,7 +279,7 @@ fn duplicate_value_last_wins_hashset() { where H: std::hash::Hasher, { - self.0.hash(state) + self.0.hash(state); } } diff --git a/serde_with/tests/schemars_0_8.rs b/serde_with/tests/schemars_0_8.rs index aa38cc26..bf3926ed 100644 --- a/serde_with/tests/schemars_0_8.rs +++ b/serde_with/tests/schemars_0_8.rs @@ -351,7 +351,7 @@ mod array { fn test_oob_item() { check_matches_schema::(&json!({ "array": [-1, 0x1_0000_0000i64, 32] - })) + })); } } @@ -417,7 +417,7 @@ mod bool_from_int { fn test_fractional_value_strict() { check_matches_schema::(&json!({ "value": 0.5 - })) + })); } #[test] @@ -425,7 +425,7 @@ mod bool_from_int { fn test_fractional_value_flexible() { check_matches_schema::(&json!({ "value": 0.5 - })) + })); } } diff --git a/serde_with/tests/utils.rs b/serde_with/tests/utils.rs index e86d3868..5098f2d8 100644 --- a/serde_with/tests/utils.rs +++ b/serde_with/tests/utils.rs @@ -75,7 +75,7 @@ where &serde_json::from_str::(deserialize_from) .unwrap_err() .to_string(), - ) + ); } #[track_caller] diff --git a/serde_with/tests/version_numbers.rs b/serde_with/tests/version_numbers.rs index fb8193d7..ced72051 100644 --- a/serde_with/tests/version_numbers.rs +++ b/serde_with/tests/version_numbers.rs @@ -60,7 +60,7 @@ fn test_docs_rs_url_point_to_current_version() -> Result<(), Box {} } diff --git a/serde_with_macros/src/lib.rs b/serde_with_macros/src/lib.rs index eda3c32b..ca70c481 100644 --- a/serde_with_macros/src/lib.rs +++ b/serde_with_macros/src/lib.rs @@ -1,18 +1,5 @@ #![forbid(unsafe_code)] -#![warn( - clippy::semicolon_if_nothing_returned, - missing_copy_implementations, - missing_debug_implementations, - missing_docs, - rust_2018_idioms, - rustdoc::missing_crate_level_docs, - trivial_casts, - trivial_numeric_casts, - unused_extern_crates, - unused_import_braces, - unused_qualifications, - variant_size_differences -)] +#![warn(missing_copy_implementations, missing_debug_implementations)] #![doc(test(attr(forbid(unsafe_code))))] #![doc(test(attr(deny( missing_debug_implementations, diff --git a/serde_with_macros/tests/skip_serializing_null.rs b/serde_with_macros/tests/skip_serializing_null.rs index 53412ef1..dc48334b 100644 --- a/serde_with_macros/tests/skip_serializing_null.rs +++ b/serde_with_macros/tests/skip_serializing_null.rs @@ -43,6 +43,8 @@ struct DataBasic { } test!(test_basic, DataBasic); +// This tests different ways of qualifying the Option type +#[allow(unused_qualifications)] #[skip_serializing_none] #[derive(Debug, Eq, PartialEq, Serialize, Deserialize)] struct DataFullyQualified { @@ -116,11 +118,15 @@ fn test_serialize_always() { assert_eq!(data, serde_json::from_value(res).unwrap()); } +// This tests different ways of qualifying the Option type +#[allow(unused_qualifications)] #[skip_serializing_none] #[derive(Debug, Eq, PartialEq, Serialize)] struct DataTuple(Option, std::option::Option); test_tuple!(test_tuple, DataTuple); +// This tests different ways of qualifying the Option type +#[allow(unused_qualifications)] #[skip_serializing_none] #[derive(Debug, Eq, PartialEq, Serialize)] enum DataEnum { From 510e7649479a6c2bcc0a0e175e7df0bf83e41b99 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Tue, 20 Feb 2024 22:45:37 +0100 Subject: [PATCH 2/4] More lint cleanups --- Cargo.toml | 8 ++++++++ serde_with/src/de/impls.rs | 4 ++-- serde_with/src/lib.rs | 11 ----------- serde_with/src/ser/impls.rs | 4 ++-- serde_with_macros/src/lib.rs | 6 ++---- 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index add223ff..33adcdb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,8 +32,16 @@ unused_extern_crates = "warn" unused_import_braces = "warn" unused_qualifications = "warn" variant_size_differences = "warn" +# Unsafe code is needed for array initialization using MaybeUninit. +# unsafe_code = "forbid" [workspace.lints.clippy] +# These lints have false positives and are disabled until they are fixed. + +# explicit_auto_deref suggests code that does not compile +# https://github.com/rust-lang/rust-clippy/issues/9841 +explicit_auto_deref = "allow" + # alloc_instead_of_core = "warn" # Checks for usage of `cloned()` on an `Iterator` or `Option` where `copied()` could be used instead. cloned_instead_of_copied = "warn" diff --git a/serde_with/src/de/impls.rs b/serde_with/src/de/impls.rs index 6ae1f0fa..00647fdc 100644 --- a/serde_with/src/de/impls.rs +++ b/serde_with/src/de/impls.rs @@ -14,9 +14,9 @@ use indexmap_2::{IndexMap as IndexMap2, IndexSet as IndexSet2}; type BoxedSlice = Box<[T]>; pub(crate) mod macros { - // The unused_import lint has false-positives around macros + // The unused_imports lint has false-positives around macros // https://github.com/rust-lang/rust/issues/78894 - #![allow(unused_import)] + #![allow(unused_imports)] macro_rules! foreach_map { ($m:ident) => { diff --git a/serde_with/src/lib.rs b/serde_with/src/lib.rs index 2ac6019e..60562b2b 100644 --- a/serde_with/src/lib.rs +++ b/serde_with/src/lib.rs @@ -14,17 +14,6 @@ #![doc(test(no_crate_inject))] #![doc(html_root_url = "https://docs.rs/serde_with/3.6.1/")] #![cfg_attr(docsrs, feature(doc_cfg))] -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8560 - clippy::only_used_in_recursion, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, - // https://github.com/rust-lang/rust-clippy/issues/9101 - clippy::explicit_auto_deref -)] #![no_std] //! [![crates.io badge](https://img.shields.io/crates/v/serde_with.svg)](https://crates.io/crates/serde_with/) diff --git a/serde_with/src/ser/impls.rs b/serde_with/src/ser/impls.rs index 96c9915c..dac8cfa9 100644 --- a/serde_with/src/ser/impls.rs +++ b/serde_with/src/ser/impls.rs @@ -15,9 +15,9 @@ type BoxedSlice = Box<[T]>; type Slice = [T]; pub(crate) mod macros { - // The unused_import lint has false-positives around macros + // The unused_imports lint has false-positives around macros // https://github.com/rust-lang/rust/issues/78894 - #![allow(unused_import)] + #![allow(unused_imports)] macro_rules! foreach_map { ($m:ident) => { diff --git a/serde_with_macros/src/lib.rs b/serde_with_macros/src/lib.rs index ca70c481..88870091 100644 --- a/serde_with_macros/src/lib.rs +++ b/serde_with_macros/src/lib.rs @@ -1,3 +1,5 @@ +// Cleanup when workspace lints can be overriden +// https://github.com/rust-lang/cargo/issues/13157 #![forbid(unsafe_code)] #![warn(missing_copy_implementations, missing_debug_implementations)] #![doc(test(attr(forbid(unsafe_code))))] @@ -15,10 +17,6 @@ // Not needed for 2018 edition and conflicts with `rust_2018_idioms` #![doc(test(no_crate_inject))] #![doc(html_root_url = "https://docs.rs/serde_with_macros/3.6.1/")] -// Necessary to silence the warning about clippy::unknown_clippy_lints on nightly -#![allow(renamed_and_removed_lints)] -// Necessary for nightly clippy lints -#![allow(clippy::unknown_clippy_lints)] // Tarpaulin does not work well with proc macros and marks most of the lines as uncovered. #![cfg(not(tarpaulin_include))] From 80be00db2f52a9831ef47c1f20ca756c582040d6 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Tue, 20 Feb 2024 22:45:49 +0100 Subject: [PATCH 3/4] Remove unneeded extern crate --- serde_with_macros/src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/serde_with_macros/src/lib.rs b/serde_with_macros/src/lib.rs index 88870091..01b19553 100644 --- a/serde_with_macros/src/lib.rs +++ b/serde_with_macros/src/lib.rs @@ -27,9 +27,6 @@ //! //! [`serde_with`]: https://crates.io/crates/serde_with/ -#[allow(unused_extern_crates)] -extern crate proc_macro; - mod apply; mod utils; From f3892d0ec1b34b5abba3600b502bde8845cd5552 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Tue, 20 Feb 2024 23:06:42 +0100 Subject: [PATCH 4/4] Cleanup more lints --- serde_with/src/de/impls.rs | 8 -------- serde_with/src/serde_conv.rs | 1 - serde_with/src/utils.rs | 3 --- serde_with/tests/base64.rs | 5 ----- serde_with/tests/chrono_0_4.rs | 8 -------- serde_with/tests/derives/lib.rs | 8 -------- serde_with/tests/hashbrown_0_14.rs | 8 -------- serde_with/tests/hex.rs | 8 -------- serde_with/tests/indexmap_1.rs | 8 -------- serde_with/tests/indexmap_2.rs | 8 -------- serde_with/tests/json.rs | 8 -------- serde_with/tests/rust.rs | 8 -------- serde_with/tests/serde_as/lib.rs | 8 -------- serde_with/tests/time_0_3.rs | 8 -------- serde_with/tests/version_numbers.rs | 4 ---- serde_with/tests/with_prefix.rs | 8 -------- serde_with_macros/tests/version_numbers.rs | 4 ---- serde_with_test/tests/derive_display_fromstr.rs | 2 +- serde_with_test/tests/flattened_maybe.rs | 2 +- serde_with_test/tests/serde_as_cfg.rs | 2 +- serde_with_test/tests/serde_conv.rs | 2 +- serde_with_test/tests/with_prefix.rs | 2 +- 22 files changed, 5 insertions(+), 118 deletions(-) diff --git a/serde_with/src/de/impls.rs b/serde_with/src/de/impls.rs index 00647fdc..08eb0994 100644 --- a/serde_with/src/de/impls.rs +++ b/serde_with/src/de/impls.rs @@ -378,10 +378,6 @@ macro_rules! seq_impl { $with_capacity:expr, $append:ident ) => { - // Fix for clippy regression in macros on stable - // The bug no longer exists on nightly - // https://github.com/rust-lang/rust-clippy/issues/7768 - #[allow(clippy::semicolon_if_nothing_returned)] impl<'de, T, U $(, $typaram)*> DeserializeAs<'de, $ty> for $ty where U: DeserializeAs<'de, T>, @@ -442,10 +438,6 @@ macro_rules! map_impl { $ty:ident < K $(: $kbound1:ident $(+ $kbound2:ident)*)*, V $(, $typaram:ident : $bound1:ident $(+ $bound2:ident)*)* >, $with_capacity:expr ) => { - // Fix for clippy regression in macros on stable - // The bug no longer exists on nightly - // https://github.com/rust-lang/rust-clippy/issues/7768 - #[allow(clippy::semicolon_if_nothing_returned)] impl<'de, K, V, KU, VU $(, $typaram)*> DeserializeAs<'de, $ty> for $ty where KU: DeserializeAs<'de, K>, diff --git a/serde_with/src/serde_conv.rs b/serde_with/src/serde_conv.rs index f8ddefd8..39b3f63a 100644 --- a/serde_with/src/serde_conv.rs +++ b/serde_with/src/serde_conv.rs @@ -111,7 +111,6 @@ macro_rules! serde_conv { $vis struct $m; const _:() = { - #[allow(clippy::ptr_arg)] impl $m { $vis fn serialize(x: &$t, serializer: S) -> $crate::__private__::Result where diff --git a/serde_with/src/utils.rs b/serde_with/src/utils.rs index 77baec4e..9bd42989 100644 --- a/serde_with/src/utils.rs +++ b/serde_with/src/utils.rs @@ -171,9 +171,6 @@ where // TODO could be simplified with nightly maybe_uninit_uninit_array feature // https://doc.rust-lang.org/nightly/std/mem/union.MaybeUninit.html#method.uninit_array - // Clippy is broken and has a false positive here - // https://github.com/rust-lang/rust-clippy/issues/10551 - #[allow(clippy::uninit_assumed_init)] let mut arr: [MaybeUninit; N] = unsafe { MaybeUninit::uninit().assume_init() }; // Dropping a `MaybeUninit` does nothing. Thus using raw pointer diff --git a/serde_with/tests/base64.rs b/serde_with/tests/base64.rs index 881ee0d2..cb20fadc 100644 --- a/serde_with/tests/base64.rs +++ b/serde_with/tests/base64.rs @@ -1,9 +1,4 @@ #![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, // This allows the tests to be written more uniform and not have to special case the last clone(). clippy::redundant_clone, )] diff --git a/serde_with/tests/chrono_0_4.rs b/serde_with/tests/chrono_0_4.rs index e3998378..405f8a28 100644 --- a/serde_with/tests/chrono_0_4.rs +++ b/serde_with/tests/chrono_0_4.rs @@ -1,11 +1,3 @@ -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, -)] - extern crate alloc; mod utils; diff --git a/serde_with/tests/derives/lib.rs b/serde_with/tests/derives/lib.rs index a43a3c35..9a2b6a9e 100644 --- a/serde_with/tests/derives/lib.rs +++ b/serde_with/tests/derives/lib.rs @@ -1,11 +1,3 @@ -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, -)] - mod deserialize_fromstr; mod serialize_display; #[path = "../utils.rs"] diff --git a/serde_with/tests/hashbrown_0_14.rs b/serde_with/tests/hashbrown_0_14.rs index 6f3e1d01..2f1267e8 100644 --- a/serde_with/tests/hashbrown_0_14.rs +++ b/serde_with/tests/hashbrown_0_14.rs @@ -1,11 +1,3 @@ -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, -)] - mod utils; use crate::utils::{check_deserialization, check_error_deserialization, is_equal}; diff --git a/serde_with/tests/hex.rs b/serde_with/tests/hex.rs index 2994ae47..0516ce68 100644 --- a/serde_with/tests/hex.rs +++ b/serde_with/tests/hex.rs @@ -1,11 +1,3 @@ -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, -)] - mod utils; use crate::utils::{check_deserialization, check_error_deserialization, is_equal}; diff --git a/serde_with/tests/indexmap_1.rs b/serde_with/tests/indexmap_1.rs index 58e4c976..afb7ce82 100644 --- a/serde_with/tests/indexmap_1.rs +++ b/serde_with/tests/indexmap_1.rs @@ -1,11 +1,3 @@ -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, -)] - mod utils; use crate::utils::{check_deserialization, check_error_deserialization, is_equal}; diff --git a/serde_with/tests/indexmap_2.rs b/serde_with/tests/indexmap_2.rs index 350a94c2..61edb10a 100644 --- a/serde_with/tests/indexmap_2.rs +++ b/serde_with/tests/indexmap_2.rs @@ -1,11 +1,3 @@ -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, -)] - mod utils; use crate::utils::{check_deserialization, check_error_deserialization, is_equal}; diff --git a/serde_with/tests/json.rs b/serde_with/tests/json.rs index 1babc44f..9422e9b2 100644 --- a/serde_with/tests/json.rs +++ b/serde_with/tests/json.rs @@ -1,11 +1,3 @@ -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, -)] - mod utils; use crate::utils::is_equal; diff --git a/serde_with/tests/rust.rs b/serde_with/tests/rust.rs index 8dfa91cb..cfda7f0d 100644 --- a/serde_with/tests/rust.rs +++ b/serde_with/tests/rust.rs @@ -1,11 +1,3 @@ -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, -)] - extern crate alloc; mod utils; diff --git a/serde_with/tests/serde_as/lib.rs b/serde_with/tests/serde_as/lib.rs index cfe13c82..6ac1c385 100644 --- a/serde_with/tests/serde_as/lib.rs +++ b/serde_with/tests/serde_as/lib.rs @@ -1,11 +1,3 @@ -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, -)] - extern crate alloc; mod collections; diff --git a/serde_with/tests/time_0_3.rs b/serde_with/tests/time_0_3.rs index 214ec39f..9067849d 100644 --- a/serde_with/tests/time_0_3.rs +++ b/serde_with/tests/time_0_3.rs @@ -1,11 +1,3 @@ -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, -)] - mod utils; use crate::utils::{check_deserialization, check_error_deserialization, is_equal}; diff --git a/serde_with/tests/version_numbers.rs b/serde_with/tests/version_numbers.rs index ced72051..44cd3109 100644 --- a/serde_with/tests/version_numbers.rs +++ b/serde_with/tests/version_numbers.rs @@ -1,7 +1,3 @@ -// Needed to suppress a 2021 incompatibility warning in the macro generated code -// The non_fmt_panic lint is not yet available on most Rust versions -#![allow(unknown_lints, non_fmt_panics)] - use version_sync::{assert_contains_regex, assert_html_root_url_updated}; #[test] diff --git a/serde_with/tests/with_prefix.rs b/serde_with/tests/with_prefix.rs index 843be34a..2bf9e1d7 100644 --- a/serde_with/tests/with_prefix.rs +++ b/serde_with/tests/with_prefix.rs @@ -1,11 +1,3 @@ -#![allow( - // clippy is broken and shows wrong warnings - // clippy on stable does not know yet about the lint name - unknown_lints, - // https://github.com/rust-lang/rust-clippy/issues/8867 - clippy::derive_partial_eq_without_eq, -)] - extern crate alloc; mod utils; diff --git a/serde_with_macros/tests/version_numbers.rs b/serde_with_macros/tests/version_numbers.rs index ebb4a59f..b68030d2 100644 --- a/serde_with_macros/tests/version_numbers.rs +++ b/serde_with_macros/tests/version_numbers.rs @@ -1,7 +1,3 @@ -// Needed to supress a 2021 incompatability warning in the macro generated code -// The non_fmt_panic lint is not yet available on most Rust versions -#![allow(unknown_lints, non_fmt_panics)] - #[test] fn test_html_root_url() { version_sync::assert_html_root_url_updated!("src/lib.rs"); diff --git a/serde_with_test/tests/derive_display_fromstr.rs b/serde_with_test/tests/derive_display_fromstr.rs index 058fbf15..de2ec08a 100644 --- a/serde_with_test/tests/derive_display_fromstr.rs +++ b/serde_with_test/tests/derive_display_fromstr.rs @@ -2,7 +2,7 @@ // Ensure no prelude is available #![no_implicit_prelude] -#![allow(dead_code, unused_imports)] +#![allow(dead_code)] use ::s_with::{DeserializeFromStr, SerializeDisplay}; diff --git a/serde_with_test/tests/flattened_maybe.rs b/serde_with_test/tests/flattened_maybe.rs index 3b189754..3f5816c7 100644 --- a/serde_with_test/tests/flattened_maybe.rs +++ b/serde_with_test/tests/flattened_maybe.rs @@ -2,7 +2,7 @@ // Ensure no prelude is available #![no_implicit_prelude] -#![allow(dead_code, unused_imports)] +#![allow(dead_code)] // The macro creates custom deserialization code. // You need to specify a function name and the field name of the flattened field. diff --git a/serde_with_test/tests/serde_as_cfg.rs b/serde_with_test/tests/serde_as_cfg.rs index f4d88aff..e133ce77 100644 --- a/serde_with_test/tests/serde_as_cfg.rs +++ b/serde_with_test/tests/serde_as_cfg.rs @@ -2,7 +2,7 @@ // Ensure no prelude is available #![no_implicit_prelude] -#![allow(dead_code, unused_imports)] +#![allow(dead_code)] #[cfg_attr(test, ::cfg_eval::cfg_eval, ::s_with::serde_as(crate = "::s_with"))] #[cfg_attr(test, derive(::s::Serialize, ::s::Deserialize))] diff --git a/serde_with_test/tests/serde_conv.rs b/serde_with_test/tests/serde_conv.rs index 0a9ce86b..f5a956f9 100644 --- a/serde_with_test/tests/serde_conv.rs +++ b/serde_with_test/tests/serde_conv.rs @@ -2,7 +2,7 @@ // Ensure no prelude is available #![no_implicit_prelude] -#![allow(dead_code, unused_imports)] +#![allow(dead_code)] use ::s_with::serde_conv; diff --git a/serde_with_test/tests/with_prefix.rs b/serde_with_test/tests/with_prefix.rs index e3ca7c08..9ee2176a 100644 --- a/serde_with_test/tests/with_prefix.rs +++ b/serde_with_test/tests/with_prefix.rs @@ -2,7 +2,7 @@ // Ensure no prelude is available #![no_implicit_prelude] -#![allow(dead_code, unused_imports)] +#![allow(dead_code)] use ::s_with::with_prefix;