Make async drop code more consistent with regular drop code
Fixes #126573
This commit is contained in:
parent
f873ae029e
commit
af10880f6b
4 changed files with 67 additions and 14 deletions
|
@ -288,6 +288,7 @@ pub fn transform_instance<'tcx>(
|
|||
mut instance: Instance<'tcx>,
|
||||
options: TransformTyOptions,
|
||||
) -> Instance<'tcx> {
|
||||
// FIXME: account for async-drop-glue
|
||||
if (matches!(instance.def, ty::InstanceKind::Virtual(..))
|
||||
&& tcx.is_lang_item(instance.def_id(), LangItem::DropInPlace))
|
||||
|| matches!(instance.def, ty::InstanceKind::DropGlue(..))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue