about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-abort.diff
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2021-12-18 20:02:03 -0500
committerBen Kimock <kimockb@gmail.com>2021-12-18 20:02:03 -0500
commita5a91c8e0732753de7c028182cbb02901fe1b608 (patch)
tree557a6e8f8733687f53f3981841e2ada13156de81 /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-abort.diff
parentdaf2204aa4954a9426cee93eb1baa2b26eb69070 (diff)
downloadrust-a5a91c8e0732753de7c028182cbb02901fe1b608.tar.gz
rust-a5a91c8e0732753de7c028182cbb02901fe1b608.zip
Derive src pointers in sort drop guards from &T
The src pointers in CopyOnDrop and InsertionHole used to be *mut T, and
were derived via automatic conversion from &mut T. According to Stacked
Borrows 2.1, this means that those pointers become invalidated by
interior mutation in the comparison function.

But there's no need for mutability in this code path. Thus, we can
change the drop guards to use *const and derive those from &T.
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions