@@ -269,9 +269,6 @@ declare_features! (
269269 // Allows `impl Trait` in function return types.
270270 ( active, conservative_impl_trait, "1.12.0" , Some ( 34511 ) ) ,
271271
272- // Permits numeric fields in struct expressions and patterns.
273- ( active, relaxed_adts, "1.12.0" , Some ( 35626 ) ) ,
274-
275272 // The `!` type
276273 ( active, never_type, "1.13.0" , Some ( 35121 ) ) ,
277274
@@ -422,7 +419,10 @@ declare_features! (
422419 ( accepted, windows_subsystem, "1.18.0" , Some ( 37499 ) ) ,
423420 // Allows `break {expr}` with a value inside `loop`s.
424421 ( accepted, loop_break_value, "1.19.0" , Some ( 37339 ) ) ,
422+ // Permits numeric fields in struct expressions and patterns.
423+ ( accepted, relaxed_adts, "1.19.0" , Some ( 35626 ) ) ,
425424) ;
425+
426426// If you change this, please modify src/doc/unstable-book as well. You must
427427// move that documentation into the relevant place in the other docs, and
428428// remove the chapter on the flag.
@@ -1104,10 +1104,6 @@ fn contains_novel_literal(item: &ast::MetaItem) -> bool {
11041104 }
11051105}
11061106
1107- fn starts_with_digit ( s : & str ) -> bool {
1108- s. as_bytes ( ) . first ( ) . cloned ( ) . map_or ( false , |b| b >= b'0' && b <= b'9' )
1109- }
1110-
11111107impl < ' a > Visitor < ' a > for PostExpansionVisitor < ' a > {
11121108 fn visit_attribute ( & mut self , attr : & ast:: Attribute ) {
11131109 if !attr. span . allows_unstable ( ) {
@@ -1291,15 +1287,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
12911287 ast:: ExprKind :: InPlace ( ..) => {
12921288 gate_feature_post ! ( & self , placement_in_syntax, e. span, EXPLAIN_PLACEMENT_IN ) ;
12931289 }
1294- ast:: ExprKind :: Struct ( _, ref fields, _) => {
1295- for field in fields {
1296- if starts_with_digit ( & field. ident . node . name . as_str ( ) ) {
1297- gate_feature_post ! ( & self , relaxed_adts,
1298- field. span,
1299- "numeric fields in struct expressions are unstable" ) ;
1300- }
1301- }
1302- }
13031290 ast:: ExprKind :: Lit ( ref lit) => {
13041291 if let ast:: LitKind :: Int ( _, ref ty) = lit. node {
13051292 match * ty {
@@ -1339,15 +1326,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
13391326 pattern. span,
13401327 "box pattern syntax is experimental" ) ;
13411328 }
1342- PatKind :: Struct ( _, ref fields, _) => {
1343- for field in fields {
1344- if starts_with_digit ( & field. node . ident . name . as_str ( ) ) {
1345- gate_feature_post ! ( & self , relaxed_adts,
1346- field. span,
1347- "numeric fields in struct patterns are unstable" ) ;
1348- }
1349- }
1350- }
13511329 PatKind :: Range ( _, _, RangeEnd :: Excluded ) => {
13521330 gate_feature_post ! ( & self , exclusive_range_pattern, pattern. span,
13531331 "exclusive range pattern syntax is experimental" ) ;
0 commit comments