mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
Warn when lint level is set on a match arm
This commit is contained in:
parent
2d9af160af
commit
17c7d21650
1 changed files with 1 additions and 1 deletions
|
@ -9,12 +9,12 @@ fn repeat() -> ! {
|
|||
}
|
||||
|
||||
pub fn f(x: Ordering) {
|
||||
#[deny(non_exhaustive_omitted_patterns)]
|
||||
match x {
|
||||
Ordering::Relaxed => println!("relaxed"),
|
||||
Ordering::Release => println!("release"),
|
||||
Ordering::Acquire => println!("acquire"),
|
||||
Ordering::AcqRel | Ordering::SeqCst => repeat(),
|
||||
#[deny(non_exhaustive_omitted_patterns)]
|
||||
_ => repeat(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue