1
Fork 0

Rollup merge of #129061 - compiler-errors:lang-item, r=Urgau

Use `is_lang_item` more

Few places that I missed since introducing `TyCtxt::is_lang_item`.
This commit is contained in:
Matthias Krüger 2024-08-14 05:05:52 +02:00 committed by GitHub
commit cd6852b9ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 26 additions and 24 deletions

View file

@ -621,7 +621,7 @@ fn fn_abi_new_uncached<'tcx>(
let rust_abi = matches!(sig.abi, RustIntrinsic | Rust | RustCall);
let is_drop_in_place =
fn_def_id.is_some() && fn_def_id == cx.tcx.lang_items().drop_in_place_fn();
fn_def_id.is_some_and(|def_id| cx.tcx.is_lang_item(def_id, LangItem::DropInPlace));
let arg_of = |ty: Ty<'tcx>, arg_idx: Option<usize>| -> Result<_, &'tcx FnAbiError<'tcx>> {
let span = tracing::debug_span!("arg_of");