rust/library/alloc
Ben Kimock a5a91c8e07 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.
2021-12-18 20:02:03 -05:00
..
benches update vec::retain benchmarks 2021-12-04 16:20:35 +01:00
src Derive src pointers in sort drop guards from &T 2021-12-18 20:02:03 -05:00
tests Rollup merge of #91916 - steffahn:fix-typos, r=dtolnay 2021-12-15 10:57:02 +01:00
Cargo.toml rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00