@@ -510,10 +510,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
510
510
visit:: walk_expr ( self , e)
511
511
}
512
512
513
- fn visit_arm ( & mut self , arm : & ' a ast:: Arm ) {
514
- visit:: walk_arm ( self , arm)
515
- }
516
-
517
513
fn visit_pat ( & mut self , pattern : & ' a ast:: Pat ) {
518
514
match & pattern. kind {
519
515
PatKind :: Slice ( pats) => {
@@ -533,11 +529,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
533
529
}
534
530
}
535
531
}
536
- PatKind :: Box ( ..) => {
537
- gate_feature_post ! ( & self , box_patterns,
538
- pattern. span,
539
- "box pattern syntax is experimental" ) ;
540
- }
541
532
PatKind :: Range ( _, _, Spanned { node : RangeEnd :: Excluded , .. } ) => {
542
533
gate_feature_post ! ( & self , exclusive_range_pattern, pattern. span,
543
534
"exclusive range pattern syntax is experimental" ) ;
@@ -547,11 +538,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
547
538
visit:: walk_pat ( self , pattern)
548
539
}
549
540
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 ) {
555
542
if let Some ( header) = fn_kind. header ( ) {
556
543
// Stability of const fn methods are covered in
557
544
// `visit_trait_item` and `visit_impl_item` below; this is
@@ -827,6 +814,7 @@ pub fn check_crate(krate: &ast::Crate,
827
814
gate_all ! ( crate_visibility_modifier, "`crate` visibility modifier is experimental" ) ;
828
815
gate_all ! ( const_generics, "const generics are unstable" ) ;
829
816
gate_all ! ( decl_macro, "`macro` is experimental" ) ;
817
+ gate_all ! ( box_patterns, "box pattern syntax is experimental" ) ;
830
818
831
819
visit:: walk_crate ( & mut visitor, krate) ;
832
820
}
0 commit comments