Add regression test for matches! + non_exhaustive_omitted_patterns lint
This commit is contained in:
parent
8a1b20ed60
commit
0e30629600
2 changed files with 7 additions and 0 deletions
|
|
@ -76,6 +76,7 @@
|
|||
#![feature(min_specialization)]
|
||||
#![feature(never_type)]
|
||||
#![feature(next_index)]
|
||||
#![feature(non_exhaustive_omitted_patterns_lint)]
|
||||
#![feature(numfmt)]
|
||||
#![feature(pattern)]
|
||||
#![feature(pointer_is_aligned_to)]
|
||||
|
|
|
|||
|
|
@ -213,3 +213,9 @@ fn _expression() {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[deny(non_exhaustive_omitted_patterns)]
|
||||
fn _matches_does_not_trigger_non_exhaustive_omitted_patterns_lint(o: core::sync::atomic::Ordering) {
|
||||
// Ordering is a #[non_exhaustive] enum from a separate crate
|
||||
let _m = matches!(o, core::sync::atomic::Ordering::Relaxed);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue