diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-08-01 18:43:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-01 18:43:40 +0200 |
| commit | 8671b0bfbd905c69773657d8f87eb08ccf01056d (patch) | |
| tree | 0f0071faf7a89f21626844c7c7776aa62a6e7699 /compiler/rustc_parse/src/errors.rs | |
| parent | 683f2d3cb2fbcaf1650f35070448329036e75750 (diff) | |
| parent | db1652e07b7e6f81692795e7cb3b8c02798b1756 (diff) | |
| download | rust-8671b0bfbd905c69773657d8f87eb08ccf01056d.tar.gz rust-8671b0bfbd905c69773657d8f87eb08ccf01056d.zip | |
Rollup merge of #128482 - RalfJung:ptr-signed-offset, r=oli-obk
interpret: on a signed deref check, mention the right pointer in the error When a negative offset (like `ptr.offset(-10)`) goes out-of-bounds, we currently show an error saying that we expect the *resulting* pointer to be inbounds for 10 bytes. That's confusing, so this PR makes it so that instead we say that we expect the *original* pointer `ptr` to have 10 bytes *to the left*. I also realized I can simplify the pointer arithmetic logic and handling of "staying inbounds of a target `usize`" quite a bit; the second commit does that.
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
