We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 276122f commit edc6d76Copy full SHA for edc6d76
src/int/specialized_div_rem/mod.rs
@@ -72,7 +72,10 @@ mod asymmetric;
72
/// impossible to reach by Rust users, unless `compiler-builtins` public division functions or
73
/// `core/std::unchecked_div/rem` are directly used without a zero check in front.
74
fn zero_div_fn() -> ! {
75
- unsafe { core::hint::unreachable_unchecked() }
+ // Calling the intrinsic directly, to avoid the `assert_unsafe_precondition` that cannot be used
76
+ // here because it involves non-`inline` functions
77
+ // (https://github.com/rust-lang/compiler-builtins/issues/491).
78
+ unsafe { core::intrinsics::unreachable() }
79
}
80
81
const USE_LZ: bool = {
0 commit comments