diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-10-31 18:49:22 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-10-31 19:08:12 +0200 |
| commit | 56d7bb2133c82ec73fa17d9b02872feb4bf09c63 (patch) | |
| tree | 43b98bf8affbd606601c14b472108225cf339090 /src/libsyntax | |
| parent | b05d36228ef95f4d628b7f8338ecca3b320806e4 (diff) | |
| download | rust-56d7bb2133c82ec73fa17d9b02872feb4bf09c63.tar.gz rust-56d7bb2133c82ec73fa17d9b02872feb4bf09c63.zip | |
Revert "pre-expansion gate associated_type_bounds"
This reverts commit c17a1fd7d0ef0f1f546445d0c8bdb11be55e4be7.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate/check.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libsyntax/feature_gate/check.rs b/src/libsyntax/feature_gate/check.rs index 184a38dfaed..a4fc6114b98 100644 --- a/src/libsyntax/feature_gate/check.rs +++ b/src/libsyntax/feature_gate/check.rs @@ -3,7 +3,10 @@ use super::accepted::ACCEPTED_FEATURES; use super::removed::{REMOVED_FEATURES, STABLE_REMOVED_FEATURES}; use super::builtin_attrs::{AttributeGate, BUILTIN_ATTRIBUTE_MAP}; -use crate::ast::{self, NodeId, GenericParam, GenericParamKind, PatKind, RangeEnd, VariantData}; +use crate::ast::{ + self, AssocTyConstraint, AssocTyConstraintKind, NodeId, GenericParam, GenericParamKind, + PatKind, RangeEnd, VariantData, +}; use crate::attr::{self, check_builtin_attribute}; use crate::source_map::Spanned; use crate::edition::{ALL_EDITIONS, Edition}; @@ -604,6 +607,16 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { visit::walk_generic_param(self, param) } + fn visit_assoc_ty_constraint(&mut self, constraint: &'a AssocTyConstraint) { + match constraint.kind { + AssocTyConstraintKind::Bound { .. } => + gate_feature_post!(&self, associated_type_bounds, constraint.span, + "associated type bounds are unstable"), + _ => {} + } + visit::walk_assoc_ty_constraint(self, constraint) + } + fn visit_trait_item(&mut self, ti: &'a ast::TraitItem) { match ti.kind { ast::TraitItemKind::Method(ref sig, ref block) => { |
