Collect newly synthesized RPITITs on ImplTraitInTraitCollector

This commit is contained in:
Santiago Pastorino 2023-03-03 12:32:33 -03:00
parent 97eaa5dbf4
commit 3ecb70125e
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF

View File

@ -830,7 +830,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ImplTraitInTraitCollector<'_, 'tcx> {
fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {
if let ty::Alias(ty::Projection, proj) = ty.kind()
&& self.interner().def_kind(proj.def_id) == DefKind::ImplTraitPlaceholder
&& self.interner().is_impl_trait_in_trait(proj.def_id)
{
if let Some((ty, _)) = self.types.get(&proj.def_id) {
return *ty;