From ce7b069fd840916415adf2357c6133e2c1e4625b Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Fri, 19 Jul 2024 16:52:33 -0700 Subject: compiler: Never debug_assert in codegen The gains in performance are not worth the costs in correctness. This is partly because the gains are zero and the costs are unknown. --- compiler/rustc_codegen_llvm/src/debuginfo/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_codegen_llvm/src/debuginfo/utils.rs') diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/utils.rs b/compiler/rustc_codegen_llvm/src/debuginfo/utils.rs index 155e7a89fd8..9bd2ccceadf 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/utils.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/utils.rs @@ -81,7 +81,7 @@ pub(crate) fn fat_pointer_kind<'ll, 'tcx>( ty::Dynamic(..) => Some(FatPtrKind::Dyn), ty::Foreign(_) => { // Assert that pointers to foreign types really are thin: - debug_assert_eq!( + assert_eq!( cx.size_of(Ty::new_imm_ptr(cx.tcx, pointee_tail_ty)), cx.size_of(Ty::new_imm_ptr(cx.tcx, cx.tcx.types.u8)) ); -- cgit 1.4.1-3-g733a5