about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 53b57cdfaa1..945e457a77b 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -163,8 +163,12 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[
 
     // Allows the definition recursive static items.
     ("static_recursion", "1.3.0", Active),
-// Allows default type parameters to influence type inference.
-    ("default_type_parameter_fallback", "1.3.0", Active)
+
+    // Allows default type parameters to influence type inference.
+    ("default_type_parameter_fallback", "1.3.0", Active),
+
+    // Allows associated type defaults
+    ("associated_type_defaults", "1.2.0", Active),
 ];
 // (changing above list without updating src/doc/reference.md makes @cmr sad)
 
@@ -762,6 +766,10 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
                     self.gate_feature("const_fn", ti.span, "const fn is unstable");
                 }
             }
+            ast::TypeTraitItem(_, Some(_)) => {
+                self.gate_feature("associated_type_defaults", ti.span,
+                                  "associated type defaults are unstable");
+            }
             _ => {}
         }
         visit::walk_trait_item(self, ti);