1
Fork 0

Use is_lang_item more aggressively

This commit is contained in:
Michael Goulet 2024-06-14 14:46:32 -04:00
parent d5c48ebc71
commit 93ff86ed7c
44 changed files with 171 additions and 166 deletions

View file

@ -289,7 +289,7 @@ pub fn transform_instance<'tcx>(
options: TransformTyOptions,
) -> Instance<'tcx> {
if (matches!(instance.def, ty::InstanceDef::Virtual(..))
&& Some(instance.def_id()) == tcx.lang_items().drop_in_place_fn())
&& tcx.is_lang_item(instance.def_id(), LangItem::DropInPlace))
|| matches!(instance.def, ty::InstanceDef::DropGlue(..))
{
// Adjust the type ids of DropGlues