diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-05-06 02:00:45 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-05-10 13:01:43 -0700 |
| commit | 15aa7fad7ec83db399c8a85c6b6777d0efc7bc53 (patch) | |
| tree | 536d70cd09ce950ce744c6e9975a16e92d71a941 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 50dff955a9367a4efc72b831549e368992807beb (diff) | |
| download | rust-15aa7fad7ec83db399c8a85c6b6777d0efc7bc53.tar.gz rust-15aa7fad7ec83db399c8a85c6b6777d0efc7bc53.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
