about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-03-31 08:50:35 +0000
committerbors <bors@rust-lang.org>2023-03-31 08:50:35 +0000
commite2e598f5fb4a7a735e40eaab3db1fb069f7db365 (patch)
tree26c2610a4e0b20193fdf408b0ed21102994b9b33 /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff
parent69b57c2db5e8718525aa1cd5b954708387a5e594 (diff)
parent8b18860677a84778478deed4408586ebaaac868b (diff)
downloadrust-e2e598f5fb4a7a735e40eaab3db1fb069f7db365.tar.gz
rust-e2e598f5fb4a7a735e40eaab3db1fb069f7db365.zip
Auto merge of #98112 - saethlin:mir-alignment-checks, r=oli-obk
Insert alignment checks for pointer dereferences when debug assertions are enabled

Closes https://github.com/rust-lang/rust/issues/54915

- [x] Jake tells me this sounds like a place to use `MirPatch`, but I can't figure out how to insert a new basic block with a new terminator in the middle of an existing basic block, using `MirPatch`. (if nobody else backs up this point I'm checking this as "not actually a good idea" because the code looks pretty clean to me after rearranging it a bit)
- [x] Using `CastKind::PointerExposeAddress` is definitely wrong, we don't want to expose. Calling a function to get the pointer address seems quite excessive. ~I'll see if I can add a new `CastKind`.~ `CastKind::Transmute` to the rescue!
- [x] Implement a more helpful panic message like slice bounds checking.

r? `@oli-obk`
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions