diff options
| author | Sunjay Varma <varma.sunjay@gmail.com> | 2017-11-09 21:40:14 -0500 |
|---|---|---|
| committer | Sunjay Varma <varma.sunjay@gmail.com> | 2017-12-01 01:26:29 -0500 |
| commit | f29613437fb1925ead92f81cd2495d7b92a5fd2a (patch) | |
| tree | 1d42c8b6e500c9b20d5414ef624897a6668dc7b1 /src/libsyntax | |
| parent | 6bd8ea1a6b88545e59442a3603f1b235cf57e3ba (diff) | |
| download | rust-f29613437fb1925ead92f81cd2495d7b92a5fd2a.tar.gz rust-f29613437fb1925ead92f81cd2495d7b92a5fd2a.zip | |
Adding feature gate
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index c1223efb27b..9b5be298fd5 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -431,6 +431,9 @@ declare_features! ( // Nested groups in `use` (RFC 2128) (active, use_nested_groups, "1.23.0", Some(44494)), + + // generic associated types (RFC 1598) + (active, generic_associated_types, "1.23.0", Some(44265)), ); declare_features! ( @@ -1618,6 +1621,9 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { gate_feature_post!(&self, associated_type_defaults, ti.span, "associated type defaults are unstable"); } + _ if ti.generics.is_parameterized() => { + gate_feature_post!(&self, generic_associated_types, ti.span, "generic associated types are unstable"); + } _ => {} } visit::walk_trait_item(self, ti); @@ -1636,6 +1642,9 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { gate_feature_post!(&self, const_fn, ii.span, "const fn is unstable"); } } + _ if ii.generics.is_parameterized() => { + gate_feature_post!(&self, generic_associated_types, ii.span, "generic associated types are unstable"); + } _ => {} } visit::walk_impl_item(self, ii); |
