@@ -3,9 +3,8 @@ use super::accepted::ACCEPTED_FEATURES;
33use super :: removed:: { REMOVED_FEATURES , STABLE_REMOVED_FEATURES } ;
44use super :: builtin_attrs:: { AttributeGate , BUILTIN_ATTRIBUTE_MAP } ;
55
6- use crate :: ast:: { self , NodeId , PatKind , RangeEnd , VariantData } ;
6+ use crate :: ast:: { self , NodeId , PatKind , VariantData } ;
77use crate :: attr:: { self , check_builtin_attribute} ;
8- use crate :: source_map:: Spanned ;
98use crate :: edition:: { ALL_EDITIONS , Edition } ;
109use crate :: visit:: { self , FnKind , Visitor } ;
1110use crate :: parse:: token;
@@ -529,10 +528,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
529528 }
530529 }
531530 }
532- PatKind :: Range ( _, _, Spanned { node : RangeEnd :: Excluded , .. } ) => {
533- gate_feature_post ! ( & self , exclusive_range_pattern, pattern. span,
534- "exclusive range pattern syntax is experimental" ) ;
535- }
536531 _ => { }
537532 }
538533 visit:: walk_pat ( self , pattern)
@@ -815,6 +810,7 @@ pub fn check_crate(krate: &ast::Crate,
815810 gate_all ! ( const_generics, "const generics are unstable" ) ;
816811 gate_all ! ( decl_macro, "`macro` is experimental" ) ;
817812 gate_all ! ( box_patterns, "box pattern syntax is experimental" ) ;
813+ gate_all ! ( exclusive_range_pattern, "exclusive range pattern syntax is experimental" ) ;
818814
819815 visit:: walk_crate ( & mut visitor, krate) ;
820816}
0 commit comments