about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-08-13 16:44:37 -0400
committerMichael Goulet <michael@errs.io>2024-08-13 16:44:53 -0400
commitbac19686a5f7a4cfa7dd4e311769a7e5c50931a3 (patch)
tree3d57d963db6e7b9d975c5d1cf40cc78eb0d5b411 /compiler/rustc_monomorphize/src
parente08b80c0fb7667bdcd040761891701e576c42ec8 (diff)
downloadrust-bac19686a5f7a4cfa7dd4e311769a7e5c50931a3.tar.gz
rust-bac19686a5f7a4cfa7dd4e311769a7e5c50931a3.zip
Use is_lang_item more
Diffstat (limited to 'compiler/rustc_monomorphize/src')
-rw-r--r--compiler/rustc_monomorphize/src/partitioning.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_monomorphize/src/partitioning.rs b/compiler/rustc_monomorphize/src/partitioning.rs
index 65a3d8d1742..f96329a3403 100644
--- a/compiler/rustc_monomorphize/src/partitioning.rs
+++ b/compiler/rustc_monomorphize/src/partitioning.rs
@@ -648,7 +648,9 @@ fn characteristic_def_id_of_mono_item<'tcx>(
 
             if let Some(impl_def_id) = tcx.impl_of_method(def_id) {
                 if tcx.sess.opts.incremental.is_some()
-                    && tcx.trait_id_of_impl(impl_def_id) == tcx.lang_items().drop_trait()
+                    && tcx
+                        .trait_id_of_impl(impl_def_id)
+                        .is_some_and(|def_id| tcx.is_lang_item(def_id, LangItem::Drop))
                 {
                     // Put `Drop::drop` into the same cgu as `drop_in_place`
                     // since `drop_in_place` is the only thing that can