mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
a45f69f27d
Replace most uses of `pointer::offset` with `add` and `sub` As PR title says, it replaces `pointer::offset` in compiler and standard library with `pointer::add` and `pointer::sub`. This generally makes code cleaner, easier to grasp and removes (or, well, hides) integer casts. This is generally trivially correct, `.offset(-constant)` is just `.sub(constant)`, `.offset(usized as isize)` is just `.add(usized)`, etc. However in some cases we need to be careful with signs of things. r? ````@scottmcm```` _split off from #100746_ |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml |