diff options
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 6fa6e46d880..945e457a77b 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -165,7 +165,10 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Status)] = &[ ("static_recursion", "1.3.0", Active), // Allows default type parameters to influence type inference. - ("default_type_parameter_fallback", "1.3.0", Active) + ("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) @@ -763,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); |
