Warn when lint level is set on a match arm
This commit is contained in:
parent
2d9af160af
commit
17c7d21650
@ -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…
x
Reference in New Issue
Block a user