From 5a16aebe9d83b5e7938ebd4ca7a17a0f44d7010c Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 5 Mar 2024 09:15:20 +0000 Subject: [PATCH] Remove some dead code drop_in_place has been a lang item, not an intrinsic, for forever --- compiler/rustc_codegen_ssa/src/mir/block.rs | 2 +- compiler/rustc_hir_analysis/src/check/intrinsic.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index 95a587b8181f6..b0efb646ef332 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -852,7 +852,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { } let instance = match intrinsic { - None | Some(ty::IntrinsicDef { name: sym::drop_in_place, .. }) => instance, + None => instance, Some(intrinsic) => { let mut llargs = Vec::with_capacity(1); let ret_dest = self.make_return_dest( diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index 64137f298d649..39145c2aeb7fa 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -247,7 +247,6 @@ pub fn check_intrinsic_type( ], Ty::new_unit(tcx), ), - sym::drop_in_place => (1, 0, vec![Ty::new_mut_ptr(tcx, param(0))], Ty::new_unit(tcx)), sym::needs_drop => (1, 0, vec![], tcx.types.bool), sym::type_name => (1, 0, vec![], Ty::new_static_str(tcx)),