diff options
| author | Ben Kimock <kimockb@gmail.com> | 2021-12-18 20:02:03 -0500 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2021-12-18 20:02:03 -0500 |
| commit | a5a91c8e0732753de7c028182cbb02901fe1b608 (patch) | |
| tree | 557a6e8f8733687f53f3981841e2ada13156de81 /tests/mir-opt/lower_array_len.array_len.NormalizeArrayLen.panic-abort.diff | |
| parent | daf2204aa4954a9426cee93eb1baa2b26eb69070 (diff) | |
| download | rust-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
