Skip to content

Commit 6c3bf7a

Browse files
committed
Ignore poor suggestion from branches_sharing_code lint
rust-lang/rust-clippy#7054 error: all if blocks contain the same code at the end --> serde_derive/src/de.rs:2160:5 | 2160 | / &fallthrough_arm_tokens 2161 | | }; | |_____^ | note: the lint level is defined here --> serde_derive/src/lib.rs:18:9 | 18 | #![deny(clippy::all, clippy::pedantic)] | ^^^^^^^^^^^ = note: `#[deny(clippy::branches_sharing_code)]` implied by `#[deny(clippy::all)]` = note: The end suggestion probably needs some adjustments to use the expression result correctly = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code help: consider moving the end statements out like this | 2160 | } 2161 | &fallthrough_arm_tokens; |
1 parent ce0844b commit 6c3bf7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

serde_derive/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
#![deny(clippy::all, clippy::pedantic)]
1919
// Ignored clippy lints
2020
#![allow(
21+
// clippy false positive: https://github.com/rust-lang/rust-clippy/issues/7054
22+
clippy::branches_sharing_code,
2123
clippy::cognitive_complexity,
2224
clippy::enum_variant_names,
2325
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6797

0 commit comments

Comments
 (0)