From 83d5a60cf64bbda77debdc8e91ba5486b2522880 Mon Sep 17 00:00:00 2001 From: varkor Date: Thu, 9 Aug 2018 20:58:43 +0100 Subject: Feature gate where clauses on associated type impls --- src/libsyntax/feature_gate.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/libsyntax') 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"); + } } _ => {} } -- cgit 1.4.1-3-g733a5