diff options
| author | est31 <MTest31@outlook.com> | 2017-02-12 06:49:15 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2017-02-15 07:11:13 +0100 |
| commit | aebd94fd3c151212723906fb0445f0153917abac (patch) | |
| tree | b1b6539f9641e661575e3c33a587ae532515ba68 /src/libsyntax | |
| parent | 025c328bf5ab336ff708e62a59292298dc1bc089 (diff) | |
| download | rust-aebd94fd3c151212723906fb0445f0153917abac.tar.gz rust-aebd94fd3c151212723906fb0445f0153917abac.zip | |
Stabilize field init shorthand
Closes #37340.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index a7c86bf8e06..1bed3e27847 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -288,9 +288,6 @@ declare_features! ( // Allows attributes on lifetime/type formal parameters in generics (RFC 1327) (active, generic_param_attrs, "1.11.0", Some(34761)), - // Allows field shorthands (`x` meaning `x: x`) in struct literal expressions. - (active, field_init_shorthand, "1.14.0", Some(37340)), - // The #![windows_subsystem] attribute (active, windows_subsystem, "1.14.0", Some(37499)), @@ -385,6 +382,8 @@ declare_features! ( (accepted, more_struct_aliases, "1.16.0", Some(37544)), // elide `'static` lifetimes in `static`s and `const`s (accepted, static_in_const, "1.17.0", Some(35897)), + // Allows field shorthands (`x` meaning `x: x`) in struct literal expressions. + (accepted, field_init_shorthand, "1.17.0", Some(37340)), ); // (changing above list without updating src/doc/reference.md makes @cmr sad) @@ -1233,10 +1232,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } ast::ExprKind::Struct(_, ref fields, _) => { for field in fields { - if field.is_shorthand { - gate_feature_post!(&self, field_init_shorthand, field.span, - "struct field shorthands are unstable"); - } if starts_with_digit(&field.ident.node.name.as_str()) { gate_feature_post!(&self, relaxed_adts, field.span, |
