From 5d2952100f587ee1badfd39280e6c90a28e35c3a Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 22 Apr 2025 09:50:49 +0000 Subject: Use `is_lang_item` and `as_lang_item` instead of handrolling their logic --- compiler/rustc_monomorphize/src/partitioning.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_monomorphize/src') diff --git a/compiler/rustc_monomorphize/src/partitioning.rs b/compiler/rustc_monomorphize/src/partitioning.rs index d7690a96e10..6bc8a0fc88c 100644 --- a/compiler/rustc_monomorphize/src/partitioning.rs +++ b/compiler/rustc_monomorphize/src/partitioning.rs @@ -223,7 +223,7 @@ where match mono_item.instantiation_mode(cx.tcx) { InstantiationMode::GloballyShared { .. } => {} InstantiationMode::LocalCopy => { - if Some(mono_item.def_id()) != cx.tcx.lang_items().start_fn() { + if !cx.tcx.is_lang_item(mono_item.def_id(), LangItem::Start) { continue; } } -- cgit 1.4.1-3-g733a5