diff options
| author | varkor <github@varkor.com> | 2018-08-09 20:58:43 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-08-14 21:08:21 +0100 |
| commit | 83d5a60cf64bbda77debdc8e91ba5486b2522880 (patch) | |
| tree | dd59acc8b30a34afcac86f4fe24cb01a74126480 /src/libsyntax | |
| parent | a5733050de780ae4d11e3a7af615df792fdf908e (diff) | |
| download | rust-83d5a60cf64bbda77debdc8e91ba5486b2522880.tar.gz rust-83d5a60cf64bbda77debdc8e91ba5486b2522880.zip | |
Feature gate where clauses on associated type impls
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 56e69b9df9e..3cbb3914201 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -1869,10 +1869,15 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { "existential types are unstable" ); } - - ast::ImplItemKind::Type(_) if !ii.generics.params.is_empty() => { - gate_feature_post!(&self, generic_associated_types, ii.span, - "generic associated types are unstable"); + ast::ImplItemKind::Type(_) => { + if !ii.generics.params.is_empty() { + gate_feature_post!(&self, generic_associated_types, ii.span, + "generic associated types are unstable"); + } + if !ii.generics.where_clause.predicates.is_empty() { + gate_feature_post!(&self, generic_associated_types, ii.span, + "where clauses on associated types are unstable"); + } } _ => {} } |
