1
Fork 0

Fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-ty

This commit is contained in:
Santiago Pastorino 2023-06-23 17:30:52 -03:00
parent 54d6738a8d
commit d77e55bbb9
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
27 changed files with 287 additions and 25 deletions

View file

@ -412,7 +412,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
// an RPITIT (return-position impl trait in trait) or AFIT (async fn in trait).
let output = tcx.fn_sig(assoc_item.def_id).skip_binder().output();
let output = if let ty::Alias(ty::Projection, alias_ty) = *output.skip_binder().kind()
&& tcx.def_kind(alias_ty.def_id) == DefKind::ImplTraitPlaceholder
&& tcx.is_impl_trait_in_trait(alias_ty.def_id)
{
alias_ty
} else {