From 536221b1f93a5dcf97352c7d1e3b93a5a56bf747 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 10 Aug 2024 23:58:58 -0700 Subject: [PATCH] Temporarily ignore collection_is_never_read on FlattenSkipDeserializing error: collection is never read --> test_suite/tests/test_gen.rs:723:25 | 723 | #[derive(Serialize, Deserialize)] | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collection_is_never_read note: the lint level is defined here --> test_suite/tests/test_gen.rs:23:9 | 23 | #![deny(clippy::collection_is_never_read)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) --- test_suite/tests/test_gen.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test_suite/tests/test_gen.rs b/test_suite/tests/test_gen.rs index 3dacf00ab..2f43b20ba 100644 --- a/test_suite/tests/test_gen.rs +++ b/test_suite/tests/test_gen.rs @@ -720,11 +720,14 @@ fn test_gen() { flat: StdOption, } - #[derive(Serialize, Deserialize)] - pub struct FlattenSkipDeserializing { - #[serde(flatten, skip_deserializing)] - flat: T, - } + #[allow(clippy::collection_is_never_read)] // FIXME + const _: () = { + #[derive(Serialize, Deserialize)] + pub struct FlattenSkipDeserializing { + #[serde(flatten, skip_deserializing)] + flat: T, + } + }; #[derive(Serialize, Deserialize)] #[serde(untagged)]