mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 20:34:06 +00:00
![]() interpret: unify offset_from check with offset check `offset` does the check with a single `check_ptr_access` call while `offset_from` used two calls. Make them both just one one call. I originally intended to actually factor this into a common function, but I am no longer sure if that makes a lot of sense... the two functions start with pretty different precondition (e.g. `offset` *knows* that the 2nd pointer has the same provenance). I also reworded the UB messages a little. Saying it "cannot" do something is not how we usually phrase UB (as far as I know). Instead it's not *allowed* to do that. r? ``````@oli-obk`````` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |