about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-02-16 03:18:37 +0000
committerbors <bors@rust-lang.org>2017-02-16 03:18:37 +0000
commit1b6f1fe9dd29c97fca66a7377f367d0beb327b58 (patch)
tree8a465ab551534596ba12c43f8ea7994571c421f4 /src/libsyntax
parent4d6019d07a942f5041e3d81f974f34515b024d0a (diff)
parentaebd94fd3c151212723906fb0445f0153917abac (diff)
downloadrust-1b6f1fe9dd29c97fca66a7377f367d0beb327b58.tar.gz
rust-1b6f1fe9dd29c97fca66a7377f367d0beb327b58.zip
Auto merge of #39761 - est31:master, r=aturon
Stabilize field init shorthand

Closes #37340.

~Still blocked by the documentation issue #38830.~ EDIT: seems that all parts required for stabilisation are fixed, so its not blocked.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs9
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,