@@ -510,10 +510,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
510510 visit:: walk_expr ( self , e)
511511 }
512512
513- fn visit_arm ( & mut self , arm : & ' a ast:: Arm ) {
514- visit:: walk_arm ( self , arm)
515- }
516-
517513 fn visit_pat ( & mut self , pattern : & ' a ast:: Pat ) {
518514 match & pattern. kind {
519515 PatKind :: Slice ( pats) => {
@@ -533,11 +529,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
533529 }
534530 }
535531 }
536- PatKind :: Box ( ..) => {
537- gate_feature_post ! ( & self , box_patterns,
538- pattern. span,
539- "box pattern syntax is experimental" ) ;
540- }
541532 PatKind :: Range ( _, _, Spanned { node : RangeEnd :: Excluded , .. } ) => {
542533 gate_feature_post ! ( & self , exclusive_range_pattern, pattern. span,
543534 "exclusive range pattern syntax is experimental" ) ;
@@ -547,11 +538,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
547538 visit:: walk_pat ( self , pattern)
548539 }
549540
550- fn visit_fn ( & mut self ,
551- fn_kind : FnKind < ' a > ,
552- fn_decl : & ' a ast:: FnDecl ,
553- span : Span ,
554- _node_id : NodeId ) {
541+ fn visit_fn ( & mut self , fn_kind : FnKind < ' a > , fn_decl : & ' a ast:: FnDecl , span : Span , _: NodeId ) {
555542 if let Some ( header) = fn_kind. header ( ) {
556543 // Stability of const fn methods are covered in
557544 // `visit_trait_item` and `visit_impl_item` below; this is
@@ -827,6 +814,7 @@ pub fn check_crate(krate: &ast::Crate,
827814 gate_all ! ( crate_visibility_modifier, "`crate` visibility modifier is experimental" ) ;
828815 gate_all ! ( const_generics, "const generics are unstable" ) ;
829816 gate_all ! ( decl_macro, "`macro` is experimental" ) ;
817+ gate_all ! ( box_patterns, "box pattern syntax is experimental" ) ;
830818
831819 visit:: walk_crate ( & mut visitor, krate) ;
832820}
0 commit comments