mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Add regression test for matches! + non_exhaustive_omitted_patterns lint
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user