| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2022-08-25 | Stabilize `const_ptr_offset_from`. | Deadbeef | -1/+0 | |
| Stabilization has been completed [here](https://github.com/rust-lang/rust/issues/92980#issuecomment-1065644848) with a FCP. | ||||
| 2022-05-11 | Apply CR suggestions; add real tracking issue | Scott McMurray | -1/+2 | |
| 2022-05-11 | Rename `unsigned_offset_from` to `sub_ptr` | Scott McMurray | -1/+1 | |
| 2022-05-11 | Add `unsigned_offset_from` on pointers | Scott McMurray | -0/+8 | |
| Like we have `add`/`sub` which are the `usize` version of `offset`, this adds the `usize` equivalent of `offset_from`. Like how `.add(d)` replaced a whole bunch of `.offset(d as isize)`, you can see from the changes here that it's fairly common that code actually knows the order between the pointers and *wants* a `usize`, not an `isize`. As a bonus, this can do `sub nuw`+`udiv exact`, rather than `sub`+`sdiv exact`, which can be optimized slightly better because it doesn't have to worry about negatives. That's why the slice iterators weren't using `offset_from`, though I haven't updated that code in this PR because slices are so perf-critical that I'll do it as its own change. This is an intrinsic, like `offset_from`, so that it can eventually be allowed in CTFE. It also allows checking the extra safety condition -- see the test confirming that CTFE catches it if you pass the pointers in the wrong order. | ||||
| 2021-11-06 | Stabilize `const_raw_ptr_deref` for `*const T` | Jacob Pratt | -1/+0 | |
| This stabilizes dereferencing immutable raw pointers in const contexts. It does not stabilize `*mut T` dereferencing. This is placed behind the `const_raw_mut_ptr_deref` feature gate. | ||||
| 2020-08-22 | remove feature gate from tests | Ralf Jung | -1/+0 | |
| 2019-11-04 | test offset_from with two integers | Ralf Jung | -0/+6 | |
| 2019-10-18 | Adjust const eval code to reflect `offset_from` docs | Oliver Scherer | -0/+47 | |
