Rename HIR TypeBinding
to AssocItemConstraint
and related cleanup
This commit is contained in:
parent
0a59f11362
commit
34c56c45cf
108 changed files with 878 additions and 818 deletions
|
@ -1148,7 +1148,7 @@ impl<'a: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast,
|
|||
self.diag_metadata.currently_processing_generic_args = prev;
|
||||
}
|
||||
|
||||
fn visit_assoc_constraint(&mut self, constraint: &'ast AssocConstraint) {
|
||||
fn visit_assoc_item_constraint(&mut self, constraint: &'ast AssocItemConstraint) {
|
||||
self.visit_ident(constraint.ident);
|
||||
if let Some(ref gen_args) = constraint.gen_args {
|
||||
// Forbid anonymous lifetimes in GAT parameters until proper semantics are decided.
|
||||
|
@ -1157,13 +1157,13 @@ impl<'a: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast,
|
|||
});
|
||||
}
|
||||
match constraint.kind {
|
||||
AssocConstraintKind::Equality { ref term } => match term {
|
||||
AssocItemConstraintKind::Equality { ref term } => match term {
|
||||
Term::Ty(ty) => self.visit_ty(ty),
|
||||
Term::Const(c) => {
|
||||
self.resolve_anon_const(c, AnonConstKind::ConstArg(IsRepeatExpr::No))
|
||||
}
|
||||
},
|
||||
AssocConstraintKind::Bound { ref bounds } => {
|
||||
AssocItemConstraintKind::Bound { ref bounds } => {
|
||||
self.record_lifetime_params_for_impl_trait(constraint.id);
|
||||
walk_list!(self, visit_param_bound, bounds, BoundKind::Bound);
|
||||
}
|
||||
|
|
|
@ -508,7 +508,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
|
|||
let ast::AngleBracketedArg::Constraint(constraint) = param else {
|
||||
continue;
|
||||
};
|
||||
let ast::AssocConstraintKind::Bound { bounds } = &constraint.kind else {
|
||||
let ast::AssocItemConstraintKind::Bound { bounds } = &constraint.kind else {
|
||||
continue;
|
||||
};
|
||||
for bound in bounds {
|
||||
|
@ -3390,11 +3390,11 @@ fn mk_where_bound_predicate(
|
|||
};
|
||||
let mut segments = ThinVec::from(preceding);
|
||||
|
||||
let added_constraint = ast::AngleBracketedArg::Constraint(ast::AssocConstraint {
|
||||
let added_constraint = ast::AngleBracketedArg::Constraint(ast::AssocItemConstraint {
|
||||
id: DUMMY_NODE_ID,
|
||||
ident: last.ident,
|
||||
gen_args: None,
|
||||
kind: ast::AssocConstraintKind::Equality {
|
||||
kind: ast::AssocItemConstraintKind::Equality {
|
||||
term: ast::Term::Ty(ast::ptr::P(ast::Ty {
|
||||
kind: ast::TyKind::Path(None, poly_trait_ref.trait_ref.path.clone()),
|
||||
id: DUMMY_NODE_ID,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue