Skip to content

Commit

Permalink
Use debug_assert instead of expanded equivalent
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleywiser committed Jan 22, 2024
1 parent b152de2 commit 21e5bea
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions compiler/rustc_mir_transform/src/coverage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,8 @@ fn check_code_region(code_region: CodeRegion) -> Option<CodeRegion> {
?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
}
}
Expand Down

0 comments on commit 21e5bea

Please sign in to comment.