about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-06-13 21:35:55 +0200
committerGitHub <noreply@github.com>2022-06-13 21:35:55 +0200
commit426922be4052fae0df911d039576cf131579a12e (patch)
tree0280d5cd265a5ecc943ef0c5dfead65994a8863e /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent89249b199edb8454fa566d9cd12e1ae770112a29 (diff)
parente5245ef1eb2bacb07f7e2473b845d86c3bdd1b01 (diff)
downloadrust-426922be4052fae0df911d039576cf131579a12e.tar.gz
rust-426922be4052fae0df911d039576cf131579a12e.zip
Rollup merge of #97960 - RalfJung:offset-from, r=oli-obk
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``````
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions