@@ -491,17 +491,6 @@ impl<'a> Parser<'a> {
491491
492492 if let PatKind :: Ident ( _, _, sub @ None ) = & mut rhs. kind {
493493 // 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-
505494 let lhs_span = lhs. span ;
506495 // Move the LHS into the RHS as a subpattern.
507496 // The RHS is now the full pattern.
@@ -510,7 +499,12 @@ impl<'a> Parser<'a> {
510499 self . struct_span_err ( sp, "pattern on wrong side of `@`" )
511500 . span_label ( lhs_span, "pattern on the left, should be on the right" )
512501 . 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+ )
514508 . emit ( ) ;
515509 } else {
516510 // The special case above doesn't apply so we may have e.g. `A(x) @ B(y)`.
0 commit comments