Optimize async drop glue for some old types
This commit is contained in:
parent
a47173c4f7
commit
7cdd95e1a6
11 changed files with 161 additions and 89 deletions
|
@ -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`
|
||||
|
|
|
@ -1560,7 +1560,7 @@ fn confirm_builtin_candidate<'cx, 'tcx>(
|
|||
let destructor_def_id = tcx.associated_item_def_ids(trait_def_id)[0];
|
||||
assert_eq!(destructor_def_id, item_def_id);
|
||||
|
||||
(self_ty.async_destructor_ty(tcx, obligation.param_env).into(), Vec::new())
|
||||
(self_ty.async_destructor_ty(tcx).into(), Vec::new())
|
||||
} else if lang_items.pointee_trait() == Some(trait_def_id) {
|
||||
let metadata_def_id = tcx.require_lang_item(LangItem::Metadata, None);
|
||||
assert_eq!(metadata_def_id, item_def_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue