about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound_mut.NormalizeArrayLen.panic-unwind.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
commit3c964ea46c1d91831d656c200cb63195126a94c1 (patch)
tree95edb4e7b00b6f9880ec680bed741f13398e6f58 /tests/mir-opt/lower_array_len.array_bound_mut.NormalizeArrayLen.panic-unwind.diff
parent4cf5bdc60c7ccec3b5f395ee393615c224e28555 (diff)
parentf96e38becba21476460a8596f9af058f14f24339 (diff)
downloadrust-3c964ea46c1d91831d656c200cb63195126a94c1.tar.gz
rust-3c964ea46c1d91831d656c200cb63195126a94c1.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_mut.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions