Optimize async drop glue for some old types

This commit is contained in:
Daria Sukhonina
2024-05-03 15:47:23 +03:00
parent a47173c4f7
commit 7cdd95e1a6
11 changed files with 161 additions and 89 deletions

View File

@@ -839,7 +839,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for NormalizesTo<'tcx> {
| ty::Str
| ty::Slice(_)
| ty::Tuple(_)
| ty::Error(_) => self_ty.async_destructor_ty(ecx.interner(), goal.param_env),
| ty::Error(_) => self_ty.async_destructor_ty(ecx.interner()),
// We do not call `Ty::async_destructor_ty` on alias, param, or placeholder
// types, which return `<self_ty as AsyncDestruct>::AsyncDestructor`