rust/compiler/rustc_serialize/src
Matthias Krüger a45f69f27d
Rollup merge of #100822 - WaffleLapkin:no_offset_question_mark, r=scottmcm
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_
2022-08-21 16:54:07 +02:00
..
collection_impls.rs
leb128.rs
lib.rs Add diagnostic translation lints to crates that don't emit them 2022-08-18 19:29:02 +01:00
opaque.rs
serialize.rs Replace most uses of pointer::offset with add and sub 2022-08-21 02:21:41 +04:00