We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58c3999 commit 47444d7Copy full SHA for 47444d7
compiler/rustc_ty_utils/src/abi.rs
@@ -375,10 +375,8 @@ fn fn_abi_new_uncached<'tcx>(
375
use SpecAbi::*;
376
let rust_abi = matches!(sig.abi, RustIntrinsic | PlatformIntrinsic | Rust | RustCall);
377
378
- let is_drop_in_place = match (cx.tcx.lang_items().drop_in_place_fn(), fn_def_id) {
379
- (Some(drop_in_place_fn), Some(fn_def_id)) => drop_in_place_fn == fn_def_id,
380
- _ => false,
381
- };
+ let is_drop_in_place =
+ fn_def_id.is_some() && fn_def_id == cx.tcx.lang_items().drop_in_place_fn();
382
383
let arg_of = |ty: Ty<'tcx>, arg_idx: Option<usize>| -> Result<_, FnAbiError<'tcx>> {
384
let span = tracing::debug_span!("arg_of");
0 commit comments