ImplTraitPlaceholder -> is_impl_trait_in_trait
This commit is contained in:
parent
39d19ca9f2
commit
e41491fe05
10 changed files with 41 additions and 34 deletions
|
@ -268,7 +268,9 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ImplTraitInTraitFinder<'_, 'tcx> {
|
|||
|
||||
fn visit_ty(&mut self, ty: Ty<'tcx>) -> std::ops::ControlFlow<Self::BreakTy> {
|
||||
if let ty::Alias(ty::Projection, alias_ty) = *ty.kind()
|
||||
&& self.tcx.def_kind(alias_ty.def_id) == DefKind::ImplTraitPlaceholder
|
||||
// FIXME(-Zlower-impl-trait-in-trait-to-assoc-ty) need to project to the opaque, could
|
||||
// get it via type_of + subst.
|
||||
&& self.tcx.is_impl_trait_in_trait(alias_ty.def_id)
|
||||
&& self.tcx.impl_trait_in_trait_parent_fn(alias_ty.def_id) == self.fn_def_id
|
||||
&& self.seen.insert(alias_ty.def_id)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue