We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e458a79 + dfe4c49 commit acaae90Copy full SHA for acaae90
library/core/src/macros/mod.rs
@@ -340,9 +340,9 @@ pub macro debug_assert_matches($($arg:tt)*) {
340
#[stable(feature = "matches_macro", since = "1.42.0")]
341
#[cfg_attr(not(test), rustc_diagnostic_item = "matches_macro")]
342
macro_rules! matches {
343
- ($expression:expr, $(|)? $( $pattern:pat_param )|+ $( if $guard: expr )? $(,)?) => {
+ ($expression:expr, $pattern:pat $(if $guard:expr)? $(,)?) => {
344
match $expression {
345
- $( $pattern )|+ $( if $guard )? => true,
+ $pattern $(if $guard)? => true,
346
_ => false
347
}
348
};
0 commit comments