diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2018-03-25 22:40:13 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2018-03-25 22:40:13 +0100 |
| commit | d9cd6c6e8edfa43527c100fdfd619cc9d1378aea (patch) | |
| tree | 78916d65a23c263f9a19405bf8533d9a83a4a121 /src/libsyntax | |
| parent | 482a913fb337855072a53c0d602cd19947f45285 (diff) | |
| download | rust-d9cd6c6e8edfa43527c100fdfd619cc9d1378aea.tar.gz rust-d9cd6c6e8edfa43527c100fdfd619cc9d1378aea.zip | |
Feature gate where clauses on associated types
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index e69dace0c70..301924e7332 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -1734,8 +1734,8 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { } } ast::TraitItemKind::Type(_, ref default) => { - // We use two if statements instead of something like match guards so that both - // of these errors can be emitted if both cases apply. + // We use three if statements instead of something like match guards so that all + // of these errors can be emitted if all cases apply. if default.is_some() { gate_feature_post!(&self, associated_type_defaults, ti.span, "associated type defaults are unstable"); @@ -1744,6 +1744,10 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { gate_feature_post!(&self, generic_associated_types, ti.span, "generic associated types are unstable"); } + if !ti.generics.where_clause.predicates.is_empty() { + gate_feature_post!(&self, generic_associated_types, ti.span, + "where clauses on associated types are unstable"); + } } _ => {} } |
