Skip to content

Commit

Permalink
Rollup merge of rust-lang#104545 - flip1995:diag_item_matches_macro, …
Browse files Browse the repository at this point in the history
…r=compiler-errors

Readd the matches_macro diag item

This is now used by Clippy

r? `@compiler-errors`

This was removed in rust-lang#104383. But in the meantime Clippy now makes use of it https://github.com/rust-lang/rust-clippy/blob/dac600e32fce89cb4b05ae6edb0c47982b99eb48/clippy_lints/src/manual_is_ascii_check.rs#L153

---

This is blocking the Clippy sync. (kinda. I could work around it, but I don't want to play ping-pong with this change.)
  • Loading branch information
matthiaskrgr authored Nov 17, 2022
2 parents 4e59188 + 34a1434 commit 239f84b
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 239f84b

Please sign in to comment.