Use is_lang_item more
This commit is contained in:
parent
e08b80c0fb
commit
bac19686a5
12 changed files with 26 additions and 24 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue