Readd the matches_macro diag item
This is now used by Clippy
This commit is contained in:
parent
b6097f2e1b
commit
34a14349b7
2 changed files with 2 additions and 0 deletions
|
@ -893,6 +893,7 @@ symbols! {
|
||||||
masked,
|
masked,
|
||||||
match_beginning_vert,
|
match_beginning_vert,
|
||||||
match_default_bindings,
|
match_default_bindings,
|
||||||
|
matches_macro,
|
||||||
maxnumf32,
|
maxnumf32,
|
||||||
maxnumf64,
|
maxnumf64,
|
||||||
may_dangle,
|
may_dangle,
|
||||||
|
|
|
@ -338,6 +338,7 @@ pub macro debug_assert_matches($($arg:tt)*) {
|
||||||
/// ```
|
/// ```
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[stable(feature = "matches_macro", since = "1.42.0")]
|
#[stable(feature = "matches_macro", since = "1.42.0")]
|
||||||
|
#[cfg_attr(not(test), rustc_diagnostic_item = "matches_macro")]
|
||||||
macro_rules! matches {
|
macro_rules! matches {
|
||||||
($expression:expr, $(|)? $( $pattern:pat_param )|+ $( if $guard: expr )? $(,)?) => {
|
($expression:expr, $(|)? $( $pattern:pat_param )|+ $( if $guard: expr )? $(,)?) => {
|
||||||
match $expression {
|
match $expression {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue