Skip to content

Commit 9454aa2

Browse files
committed
Disable non_exhaustive_omitted_patterns within matches! macro
1 parent acb0e71 commit 9454aa2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/core/src/macros/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,10 @@ pub macro debug_assert_matches($($arg:tt)*) {
426426
#[macro_export]
427427
#[stable(feature = "matches_macro", since = "1.42.0")]
428428
#[rustc_diagnostic_item = "matches_macro"]
429+
#[allow_internal_unstable(non_exhaustive_omitted_patterns_lint)]
429430
macro_rules! matches {
430431
($expression:expr, $pattern:pat $(if $guard:expr)? $(,)?) => {
432+
#[allow(non_exhaustive_omitted_patterns)]
431433
match $expression {
432434
$pattern $(if $guard)? => true,
433435
_ => false

0 commit comments

Comments
 (0)