ProjectionTy.item_def_id -> ProjectionTy.def_id
This commit is contained in:
parent
7f3af72606
commit
5c6afb850c
50 changed files with 164 additions and 186 deletions
|
@ -110,12 +110,13 @@ fn variance_of_opaque(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[ty::Varianc
|
|||
|
||||
#[instrument(level = "trace", skip(self), ret)]
|
||||
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<Self::BreakTy> {
|
||||
match t.kind() {
|
||||
ty::Opaque(def_id, substs) => self.visit_opaque(*def_id, substs),
|
||||
// FIXME(alias): merge these
|
||||
match t.kind() {
|
||||
ty::Opaque(ty::OpaqueTy { def_id, substs }) => self.visit_opaque(*def_id, substs),
|
||||
ty::Projection(proj)
|
||||
if self.tcx.def_kind(proj.item_def_id) == DefKind::ImplTraitPlaceholder =>
|
||||
if self.tcx.def_kind(proj.def_id) == DefKind::ImplTraitPlaceholder =>
|
||||
{
|
||||
self.visit_opaque(proj.item_def_id, proj.substs)
|
||||
self.visit_opaque(proj.def_id, proj.substs)
|
||||
}
|
||||
_ => t.super_visit_with(self),
|
||||
}
|
||||
|
@ -167,7 +168,7 @@ fn variance_of_opaque(tcx: TyCtxt<'_>, item_def_id: LocalDefId) -> &[ty::Varianc
|
|||
}
|
||||
}
|
||||
ty::PredicateKind::Clause(ty::Clause::Projection(ty::ProjectionPredicate {
|
||||
projection_ty: ty::ProjectionTy { substs, item_def_id: _ },
|
||||
projection_ty: ty::ProjectionTy { substs, def_id: _ },
|
||||
term,
|
||||
})) => {
|
||||
for subst in &substs[1..] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue