From ce0844b9ecc32377b5e4545d759d385a8c46bc6a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 26 Mar 2021 23:28:07 -0400 Subject: [PATCH] Suppress match_wildcard_for_single_variants clippy false positive https://github.com/rust-lang/rust-clippy/issues/6984 error: wildcard matches only a single variant and will also match any future added variants --> serde_derive/src/internals/attr.rs:1918:9 | 1918 | _ => {} | ^ help: try this: `syn::Type::__TestExhaustive(_)` | note: the lint level is defined here --> serde_derive/src/lib.rs:18:22 | 18 | #![deny(clippy::all, clippy::pedantic)] | ^^^^^^^^^^^^^^^^ = note: `#[deny(clippy::match_wildcard_for_single_variants)]` implied by `#[deny(clippy::pedantic)]` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants error: wildcard matches only a single variant and will also match any future added variants --> serde_derive/src/internals/receiver.rs:153:13 | 153 | _ => {} | ^ help: try this: `Type::__TestExhaustive(_)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants error: wildcard matches only a single variant and will also match any future added variants --> serde_derive/src/bound.rs:190:17 | 190 | _ => {} | ^ help: try this: `syn::Type::__TestExhaustive(_)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants --- serde_derive/src/lib.rs | 2 ++ serde_derive_internals/lib.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/serde_derive/src/lib.rs b/serde_derive/src/lib.rs index 84728f12..446f1972 100644 --- a/serde_derive/src/lib.rs +++ b/serde_derive/src/lib.rs @@ -43,6 +43,8 @@ clippy::let_underscore_drop, clippy::map_err_ignore, clippy::match_same_arms, + // clippy bug: https://github.com/rust-lang/rust-clippy/issues/6984 + clippy::match_wildcard_for_single_variants, clippy::module_name_repetitions, clippy::must_use_candidate, clippy::option_if_let_else, diff --git a/serde_derive_internals/lib.rs b/serde_derive_internals/lib.rs index fe67d1f4..2e36229b 100644 --- a/serde_derive_internals/lib.rs +++ b/serde_derive_internals/lib.rs @@ -22,6 +22,8 @@ clippy::items_after_statements, clippy::let_underscore_drop, clippy::match_same_arms, + // clippy bug: https://github.com/rust-lang/rust-clippy/issues/6984 + clippy::match_wildcard_for_single_variants, clippy::missing_errors_doc, clippy::module_name_repetitions, clippy::must_use_candidate,