Commit c8343b8
authored
Rollup merge of rust-lang#69126 - RalfJung:exact-div, r=oli-obk
miri: fix exact_div
Turns out `exact_div` was relying on the broken behavior of `Rem` for `int_min % -1` that was fixed in rust-lang#69002. This PR fixes `exact_div`.
Inside rustc, `exact_div` is only used in a single place where the divisor is always positive (in `ptr_offset_from`), so we cannot test the fix in rustc. The Miri test suite covers this through the `exact_div` intrinsic, though (and it is how I found out).
One step to rust-lang#69117 (then we also need to address build failures introduced by rust-lang#68969)
r? @oli-obk1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
389 | 390 | | |
390 | 391 | | |
391 | 392 | | |
| |||
395 | 396 | | |
396 | 397 | | |
397 | 398 | | |
| 399 | + | |
398 | 400 | | |
399 | 401 | | |
400 | 402 | | |
0 commit comments