diff options
| author | Philipp Krones <hello@philkrones.com> | 2022-11-17 19:32:28 +0100 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2022-11-17 19:32:28 +0100 |
| commit | 34a14349b7c79faef22d2765905c4804ba68235d (patch) | |
| tree | c9bbdd4812e0a1028a4b1324d1e9d6fc85f91904 | |
| parent | b6097f2e1b2ca62e188ba53cf43bd66b06b36915 (diff) | |
| download | rust-34a14349b7c79faef22d2765905c4804ba68235d.tar.gz rust-34a14349b7c79faef22d2765905c4804ba68235d.zip | |
Readd the matches_macro diag item
This is now used by Clippy
| -rw-r--r-- | compiler/rustc_span/src/symbol.rs | 1 | ||||
| -rw-r--r-- | library/core/src/macros/mod.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index a56450a3573..02848bcffb2 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -893,6 +893,7 @@ symbols! { masked, match_beginning_vert, match_default_bindings, + matches_macro, maxnumf32, maxnumf64, may_dangle, diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs index 34247c05845..c20ca69a1c6 100644 --- a/library/core/src/macros/mod.rs +++ b/library/core/src/macros/mod.rs @@ -338,6 +338,7 @@ pub macro debug_assert_matches($($arg:tt)*) { /// ``` #[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 { |
