We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47735b2 commit bf3aef2Copy full SHA for bf3aef2
library/core/src/ptr/mod.rs
@@ -2275,7 +2275,9 @@ pub(crate) unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usize {
2275
#[safety::requires(m.is_power_of_two())]
2276
#[safety::requires(x < m)]
2277
#[safety::requires(x % 2 != 0)]
2278
- #[safety::ensures(|result| wrapping_mul(*result, x) % m == 1)]
+ // for Kani (v0.65.0), the below multiplication is too costly to prove
2279
+ #[cfg_attr(not(kani),
2280
+ safety::ensures(|result| wrapping_mul(*result, x) % m == 1))]
2281
#[inline]
2282
const unsafe fn mod_inv(x: usize, m: usize) -> usize {
2283
/// Multiplicative modular inverse table modulo 2⁴ = 16.
0 commit comments