rust/library/core/src/ptr
Scott McMurray 15aa7fad7e Simplify the implementation of iterators over slices of ZSTs
Currently, slice iterators over ZSTs store `end = start.wrapping_byte_add(len)`.

That's slightly convenient for `is_empty`, but kinda annoying for pretty much everything else -- see bugs like 42789, for example.

This PR instead changes it to just `end = ptr::invalid(len)` instead.

That's easier to think about (IMHO, at least) as well as easier to represent.
2023-05-10 13:01:43 -07:00
..
alignment.rs rm const traits in libcore 2023-04-16 06:49:27 +00:00
const_ptr.rs Stabilize const_ptr_read 2023-05-05 20:36:21 +02:00
metadata.rs Update bootstrap cfg 2022-12-28 09:18:43 -05:00
mod.rs Stabilize const_ptr_read 2023-05-05 20:36:21 +02:00
mut_ptr.rs Stabilize const_ptr_read 2023-05-05 20:36:21 +02:00
non_null.rs Simplify the implementation of iterators over slices of ZSTs 2023-05-10 13:01:43 -07:00
unique.rs core is now compilable 2023-04-16 07:20:26 +00:00