rust/library/alloc
Dylan DPC 5639d9793f
Rollup merge of #78476 - RalfJung:btree-alias, r=Mark-Simulacrum
fix some incorrect aliasing in the BTree

This line is wrong:
```
ptr::copy(slice.as_ptr().add(idx), slice.as_mut_ptr().add(idx + 1), slice.len() - idx);
```
When `slice.as_mut_ptr()` is called, that creates a mutable reference to the entire slice, which invalidates the raw pointer previously returned by `slice.as_ptr()`. (Miri currently misses this because raw pointers are not tracked properly.)

Cc ````````@ssomers````````
2020-11-09 01:13:40 +01:00
..
benches Reorder benches const variable 2020-09-29 21:39:24 +08:00
src Rollup merge of #78476 - RalfJung:btree-alias, r=Mark-Simulacrum 2020-11-09 01:13:40 +01:00
tests Rollup merge of #76718 - poliorcetics:vec-ui-to-unit-test, r=jyn514 2020-11-05 10:29:35 +01:00
Cargo.toml