diff options
| author | Brian Anderson <banderson@mozilla.com> | 2015-07-29 12:01:09 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2015-07-29 15:11:07 -0700 |
| commit | a09bce1047ab5714e56891edee0feab8813ba99e (patch) | |
| tree | 4b9bb542cd10053a63b53a802f43a9cab6ec1d98 /src/libsyntax | |
| parent | 1c8194c4777ce1291d78066f2c0d9052b0d2a681 (diff) | |
| download | rust-a09bce1047ab5714e56891edee0feab8813ba99e.tar.gz rust-a09bce1047ab5714e56891edee0feab8813ba99e.zip | |
Feature gate associated type defaults
There are multiple issues with them as designed and implemented. cc #27364
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); |
