Skip to content

Commit

Permalink
Readd the matches_macro diag item
Browse files Browse the repository at this point in the history
This is now used by Clippy
  • Loading branch information
flip1995 committed Nov 17, 2022
1 parent b6097f2 commit 34a1434
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,7 @@ symbols! {
masked,
match_beginning_vert,
match_default_bindings,
matches_macro,
maxnumf32,
maxnumf64,
may_dangle,
Expand Down
1 change: 1 addition & 0 deletions library/core/src/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 34a1434

Please sign in to comment.