Skip to content

Commit ab6a52a

Browse files
committed
Add regression test for #117304
1 parent 8a1b20e commit ab6a52a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

library/coretests/tests/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
#![feature(min_specialization)]
7777
#![feature(never_type)]
7878
#![feature(next_index)]
79+
#![feature(non_exhaustive_omitted_patterns_lint)]
7980
#![feature(numfmt)]
8081
#![feature(pattern)]
8182
#![feature(pointer_is_aligned_to)]

library/coretests/tests/macros.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,9 @@ fn _expression() {
213213
}
214214
);
215215
}
216+
217+
#[deny(non_exhaustive_omitted_patterns)]
218+
fn _matches_does_not_trigger_non_exhaustive_omitted_patterns_lint(o: core::sync::atomic::Ordering) {
219+
// Ordering is a #[non_exhaustive] enum from a separate crate
220+
let _m = matches!(o, core::sync::atomic::Ordering::Relaxed);
221+
}

0 commit comments

Comments
 (0)