File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 168168#![ feature( no_coverage) ] // rust-lang/rust#84605
169169#![ feature( int_error_matching) ]
170170#![ deny( unsafe_op_in_unsafe_fn) ]
171+ #![ deny( or_patterns_back_compat) ]
171172
172173// allow using `core::` in intra-doc links
173174#[ allow( unused_extern_crates) ]
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ macro_rules! assert_ne {
138138#[ unstable( feature = "assert_matches" , issue = "82775" ) ]
139139#[ allow_internal_unstable( core_panic) ]
140140macro_rules! assert_matches {
141- ( $left: expr, $( $pattern: pat ) |+ $( if $guard: expr ) ? $( , ) ?) => ( {
141+ ( $left: expr, $( $pattern: pat_param ) |+ $( if $guard: expr ) ? $( , ) ?) => ( {
142142 match $left {
143143 $( $pattern ) |+ $( if $guard ) ? => { }
144144 ref left_val => {
@@ -150,7 +150,7 @@ macro_rules! assert_matches {
150150 }
151151 }
152152 } ) ;
153- ( $left: expr, $( $pattern: pat ) |+ $( if $guard: expr ) ?, $( $arg: tt) +) => ( {
153+ ( $left: expr, $( $pattern: pat_param ) |+ $( if $guard: expr ) ?, $( $arg: tt) +) => ( {
154154 match $left {
155155 $( $pattern ) |+ $( if $guard ) ? => { }
156156 ref left_val => {
@@ -315,7 +315,7 @@ macro_rules! debug_assert_matches {
315315#[ macro_export]
316316#[ stable( feature = "matches_macro" , since = "1.42.0" ) ]
317317macro_rules! matches {
318- ( $expression: expr, $( $pattern: pat ) |+ $( if $guard: expr ) ? $( , ) ?) => {
318+ ( $expression: expr, $( $pattern: pat_param ) |+ $( if $guard: expr ) ? $( , ) ?) => {
319319 match $expression {
320320 $( $pattern ) |+ $( if $guard ) ? => true ,
321321 _ => false
You can’t perform that action at this time.
0 commit comments