Skip to content

Commit ce0844b

Browse files
committed
Suppress match_wildcard_for_single_variants clippy false positive
rust-lang/rust-clippy#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
1 parent e9270e5 commit ce0844b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

serde_derive/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
clippy::let_underscore_drop,
4444
clippy::map_err_ignore,
4545
clippy::match_same_arms,
46+
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6984
47+
clippy::match_wildcard_for_single_variants,
4648
clippy::module_name_repetitions,
4749
clippy::must_use_candidate,
4850
clippy::option_if_let_else,

serde_derive_internals/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
clippy::items_after_statements,
2323
clippy::let_underscore_drop,
2424
clippy::match_same_arms,
25+
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6984
26+
clippy::match_wildcard_for_single_variants,
2527
clippy::missing_errors_doc,
2628
clippy::module_name_repetitions,
2729
clippy::must_use_candidate,

0 commit comments

Comments
 (0)