| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2022-09-22 | Make ZST checks in core/alloc more readable | Scott McMurray | -2/+2 | |
| There's a bunch of these checks because of special handing for ZSTs in various unsafe implementations of stuff. This lets them be `T::IS_ZST` instead of `mem::size_of::<T>() == 0` every time, making them both more readable and more terse. *Not* proposed for stabilization at this time. Would be `pub(crate)` except `alloc` wants to use it too. (And while it doesn't matter now, if we ever get something like 85836 making it a const can help codegen be simpler.) | ||||
| 2022-08-28 | fill-in tracking issue for `feature(drain_keep_rest)` | Maybe Waffle | -1/+1 | |
| 2022-08-28 | add examples to `vec::Drain{,Filter}::keep_rest` docs | Maybe Waffle | -0/+18 | |
| 2022-06-05 | Add vec::Drain{,Filter}::keep_rest | Maybe Waffle | -1/+54 | |
| These methods allow to cancel draining of unyielded elements. | ||||
| 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 | -1/+1 | |
| 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-12-11 | Fix zero-sized reference to deallocated memory | The 8472 | -4/+6 | |
| fixes #91772 | ||||
| 2021-12-09 | Use `*mut [T]` instead of `[MaybeUninit<T>]` | The 8472 | -7/+5 | |
| 2021-11-20 | document why we're not directly passing drop_ptr to drop_in_place | The8472 | -0/+4 | |
| 2021-11-20 | replace vec::Drain drop loops with drop_in_place | The8472 | -14/+37 | |
| 2021-10-15 | Add #[must_use] to remaining alloc functions | John Kugelman | -0/+1 | |
| 2021-10-11 | Add #[must_use] to as_type conversions | John Kugelman | -0/+1 | |
| 2020-12-29 | style: applying Rust style | C | -5/+3 | |
| 2020-12-29 | refactor: moving Drain into drain.rs | C | -0/+157 | |
