From a09bce1047ab5714e56891edee0feab8813ba99e Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 29 Jul 2015 12:01:09 -0700 Subject: Feature gate associated type defaults There are multiple issues with them as designed and implemented. cc #27364 --- src/libsyntax/feature_gate.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/libsyntax') 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); -- cgit 1.4.1-3-g733a5