Skip to content

Commit

Permalink
More crimes, but for Miri
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Feb 3, 2024
1 parent 62d8ea0 commit 6dd581b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2617,8 +2617,9 @@ macro_rules! assert_unsafe_precondition {
#[cfg(bootstrap)]
let should_check = cfg!(debug_assertions);

// Turn assertions off in Miri, but otherwise check in codegen
#[cfg(not(bootstrap))]
let should_check = ::core::intrinsics::debug_assertions();
let should_check = !cfg!(miri) && ::core::intrinsics::debug_assertions();

if should_check {
// allow non_snake_case to allow capturing const generics
Expand Down

0 comments on commit 6dd581b

Please sign in to comment.