From 21e5beae3cc4ffd2adea9ae7b4a9d8b84a4bc0a8 Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Mon, 22 Jan 2024 10:10:00 -0600 Subject: [PATCH] Use debug_assert instead of expanded equivalent --- compiler/rustc_mir_transform/src/coverage/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_mir_transform/src/coverage/mod.rs b/compiler/rustc_mir_transform/src/coverage/mod.rs index 4b91f042f00..afeacbf2232 100644 --- a/compiler/rustc_mir_transform/src/coverage/mod.rs +++ b/compiler/rustc_mir_transform/src/coverage/mod.rs @@ -366,10 +366,8 @@ fn check_code_region(code_region: CodeRegion) -> Option { ?is_ordered, "Skipping code region that would be misinterpreted or rejected by LLVM" ); - if cfg!(debug_assertions) { - // If this happens in a debug build, ICE to make it easier to notice. - bug!("Improper code region: {code_region:?}"); - } + // If this happens in a debug build, ICE to make it easier to notice. + debug_assert!(false, "Improper code region: {code_region:?}"); None } }