@@ -269,9 +269,6 @@ declare_features! (
269
269
// Allows `impl Trait` in function return types.
270
270
( active, conservative_impl_trait, "1.12.0" , Some ( 34511 ) ) ,
271
271
272
- // Permits numeric fields in struct expressions and patterns.
273
- ( active, relaxed_adts, "1.12.0" , Some ( 35626 ) ) ,
274
-
275
272
// The `!` type
276
273
( active, never_type, "1.13.0" , Some ( 35121 ) ) ,
277
274
@@ -422,7 +419,10 @@ declare_features! (
422
419
( accepted, windows_subsystem, "1.18.0" , Some ( 37499 ) ) ,
423
420
// Allows `break {expr}` with a value inside `loop`s.
424
421
( 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 ) ) ,
425
424
) ;
425
+
426
426
// If you change this, please modify src/doc/unstable-book as well. You must
427
427
// move that documentation into the relevant place in the other docs, and
428
428
// remove the chapter on the flag.
@@ -1104,10 +1104,6 @@ fn contains_novel_literal(item: &ast::MetaItem) -> bool {
1104
1104
}
1105
1105
}
1106
1106
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
-
1111
1107
impl < ' a > Visitor < ' a > for PostExpansionVisitor < ' a > {
1112
1108
fn visit_attribute ( & mut self , attr : & ast:: Attribute ) {
1113
1109
if !attr. span . allows_unstable ( ) {
@@ -1291,15 +1287,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
1291
1287
ast:: ExprKind :: InPlace ( ..) => {
1292
1288
gate_feature_post ! ( & self , placement_in_syntax, e. span, EXPLAIN_PLACEMENT_IN ) ;
1293
1289
}
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
- }
1303
1290
ast:: ExprKind :: Lit ( ref lit) => {
1304
1291
if let ast:: LitKind :: Int ( _, ref ty) = lit. node {
1305
1292
match * ty {
@@ -1339,15 +1326,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
1339
1326
pattern. span,
1340
1327
"box pattern syntax is experimental" ) ;
1341
1328
}
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
- }
1351
1329
PatKind :: Range ( _, _, RangeEnd :: Excluded ) => {
1352
1330
gate_feature_post ! ( & self , exclusive_range_pattern, pattern. span,
1353
1331
"exclusive range pattern syntax is experimental" ) ;
0 commit comments