Feature gate
This commit is contained in:
parent
f50c1e1f05
commit
fb9ca9223d
6 changed files with 73 additions and 6 deletions
|
@ -482,12 +482,21 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
|
|||
|
||||
fn visit_assoc_constraint(&mut self, constraint: &'a AssocConstraint) {
|
||||
if let AssocConstraintKind::Bound { .. } = constraint.kind {
|
||||
gate_feature_post!(
|
||||
&self,
|
||||
associated_type_bounds,
|
||||
constraint.span,
|
||||
"associated type bounds are unstable"
|
||||
)
|
||||
if constraint.gen_args.as_ref().map_or(false, |args| args.is_parenthesized()) {
|
||||
gate_feature_post!(
|
||||
&self,
|
||||
return_type_notation,
|
||||
constraint.span,
|
||||
"return type notation is unstable"
|
||||
)
|
||||
} else {
|
||||
gate_feature_post!(
|
||||
&self,
|
||||
associated_type_bounds,
|
||||
constraint.span,
|
||||
"associated type bounds are unstable"
|
||||
)
|
||||
}
|
||||
}
|
||||
visit::walk_assoc_constraint(self, constraint)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue