Skip to content

Commit 6dd581b

Browse files
committed
More crimes, but for Miri
1 parent 62d8ea0 commit 6dd581b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/intrinsics.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2617,8 +2617,9 @@ macro_rules! assert_unsafe_precondition {
26172617
#[cfg(bootstrap)]
26182618
let should_check = cfg!(debug_assertions);
26192619

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

26232624
if should_check {
26242625
// allow non_snake_case to allow capturing const generics

0 commit comments

Comments
 (0)