@@ -491,17 +491,6 @@ impl<'a> Parser<'a> {
491
491
492
492
if let PatKind :: Ident ( _, _, sub @ None ) = & mut rhs. kind {
493
493
// The user inverted the order, so help them fix that.
494
- let mut applicability = Applicability :: MachineApplicable ;
495
- // FIXME(bindings_after_at): Remove this code when stabilizing the feature.
496
- lhs. walk ( & mut |p| match p. kind {
497
- // `check_match` is unhappy if the subpattern has a binding anywhere.
498
- PatKind :: Ident ( ..) => {
499
- applicability = Applicability :: MaybeIncorrect ;
500
- false // Short-circuit.
501
- }
502
- _ => true ,
503
- } ) ;
504
-
505
494
let lhs_span = lhs. span ;
506
495
// Move the LHS into the RHS as a subpattern.
507
496
// The RHS is now the full pattern.
@@ -510,7 +499,12 @@ impl<'a> Parser<'a> {
510
499
self . struct_span_err ( sp, "pattern on wrong side of `@`" )
511
500
. span_label ( lhs_span, "pattern on the left, should be on the right" )
512
501
. span_label ( rhs. span , "binding on the right, should be on the left" )
513
- . span_suggestion ( sp, "switch the order" , pprust:: pat_to_string ( & rhs) , applicability)
502
+ . span_suggestion (
503
+ sp,
504
+ "switch the order" ,
505
+ pprust:: pat_to_string ( & rhs) ,
506
+ Applicability :: MachineApplicable ,
507
+ )
514
508
. emit ( ) ;
515
509
} else {
516
510
// The special case above doesn't apply so we may have e.g. `A(x) @ B(y)`.
0 commit comments