]> git.lizzy.rs Git - rust.git/commitdiff
Readd the matches_macro diag item
authorPhilipp Krones <hello@philkrones.com>
Thu, 17 Nov 2022 18:32:28 +0000 (19:32 +0100)
committerPhilipp Krones <hello@philkrones.com>
Thu, 17 Nov 2022 18:32:28 +0000 (19:32 +0100)
This is now used by Clippy

compiler/rustc_span/src/symbol.rs
library/core/src/macros/mod.rs

index a56450a3573d1c10417b949c27ee0964e25ba296..02848bcffb298b43440ada72efc8a5ffd7c0a544 100644 (file)
         masked,
         match_beginning_vert,
         match_default_bindings,
+        matches_macro,
         maxnumf32,
         maxnumf64,
         may_dangle,
index 34247c058450851402a6160af94d653010fb8842..c20ca69a1c6f1dd67b6e8b68c372fd1c8e62d991 100644 (file)
@@ -338,6 +338,7 @@ macro_rules! debug_assert_ne {
 /// ```
 #[macro_export]
 #[stable(feature = "matches_macro", since = "1.42.0")]
+#[cfg_attr(not(test), rustc_diagnostic_item = "matches_macro")]
 macro_rules! matches {
     ($expression:expr, $(|)? $( $pattern:pat_param )|+ $( if $guard: expr )? $(,)?) => {
         match $expression {