about summary refs log tree commit diff
path: root/library/core
diff options
context:
space:
mode:
authorJonas Platte <jplatte+git@posteo.de>2025-07-23 00:13:11 +0200
committerJonas Platte <jplatte+git@posteo.de>2025-07-23 14:26:06 +0200
commit8a1b20ed6021d9e871c60e112dbf136699c87fab (patch)
tree18aa7a3a209387d3168bb73015dd8286f3d7c2eb /library/core
parentacb0e71c49135741f6e48c7cfb16e8b41c2235f1 (diff)
downloadrust-8a1b20ed6021d9e871c60e112dbf136699c87fab.tar.gz
rust-8a1b20ed6021d9e871c60e112dbf136699c87fab.zip
Disable non_exhaustive_omitted_patterns within matches! macro
Diffstat (limited to 'library/core')
-rw-r--r--library/core/src/macros/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs
index 8ac6ce2242d..3d57da63683 100644
--- a/library/core/src/macros/mod.rs
+++ b/library/core/src/macros/mod.rs
@@ -426,8 +426,10 @@ pub macro debug_assert_matches($($arg:tt)*) {
 #[macro_export]
 #[stable(feature = "matches_macro", since = "1.42.0")]
 #[rustc_diagnostic_item = "matches_macro"]
+#[allow_internal_unstable(non_exhaustive_omitted_patterns_lint, stmt_expr_attributes)]
 macro_rules! matches {
     ($expression:expr, $pattern:pat $(if $guard:expr)? $(,)?) => {
+        #[allow(non_exhaustive_omitted_patterns)]
         match $expression {
             $pattern $(if $guard)? => true,
             _ => false