Skip to content

Commit 239f84b

Browse files
authored
Rollup merge of #104545 - flip1995:diag_item_matches_macro, r=compiler-errors
Readd the matches_macro diag item This is now used by Clippy r? `@compiler-errors` This was removed in #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.)
2 parents 4e59188 + 34a1434 commit 239f84b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,7 @@ symbols! {
893893
masked,
894894
match_beginning_vert,
895895
match_default_bindings,
896+
matches_macro,
896897
maxnumf32,
897898
maxnumf64,
898899
may_dangle,

library/core/src/macros/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ pub macro debug_assert_matches($($arg:tt)*) {
338338
/// ```
339339
#[macro_export]
340340
#[stable(feature = "matches_macro", since = "1.42.0")]
341+
#[cfg_attr(not(test), rustc_diagnostic_item = "matches_macro")]
341342
macro_rules! matches {
342343
($expression:expr, $(|)? $( $pattern:pat_param )|+ $( if $guard: expr )? $(,)?) => {
343344
match $expression {

0 commit comments

Comments
 (0)