Skip to content

Commit 17c7d21

Browse files
committed
Warn when lint level is set on a match arm
1 parent 2d9af16 commit 17c7d21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/ui/match_same_arms_non_exhaustive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ fn repeat() -> ! {
99
}
1010

1111
pub fn f(x: Ordering) {
12+
#[deny(non_exhaustive_omitted_patterns)]
1213
match x {
1314
Ordering::Relaxed => println!("relaxed"),
1415
Ordering::Release => println!("release"),
1516
Ordering::Acquire => println!("acquire"),
1617
Ordering::AcqRel | Ordering::SeqCst => repeat(),
17-
#[deny(non_exhaustive_omitted_patterns)]
1818
_ => repeat(),
1919
}
2020
}

0 commit comments

Comments
 (0)