rust/src/liballoc
kennytm 13b055d5db
Rollup merge of #58429 - RalfJung:box, r=TimNN
fix Box::into_unique effecitvely transmuting to a raw ptr

Miri/Stacked Borrows treat `Box` specially: they assert that it is unique, and tag it appropriately. However, currently, `Box::into_inner` is not aware of that and returns a raw pointer (wrapped in a `Unique`) that carries the same tag as the box, meaning it carries a `Uniq` tag. This leads to all sorts of problems when people use the raw pointer they get out of the `Unique` type.

In the future, it'd be interesting to make `Unique` also carry some kind of uniqueness. In that case, something like this would instead be needed whenever a raw pointer is extracted from a `Unique`. However, that is out-of-scope for the current version of Stacked Borrows. So until then, this changes `into_unique` to perform a proper reference-to-raw-ptr-cast, which clears the tag.
2019-02-16 14:11:41 +08:00
..
benches Stabilize slice_sort_by_cached_key 2019-02-12 22:26:44 -08:00
collections libs: doc comments 2019-02-10 23:57:25 +00:00
tests Stabilize slice_sort_by_cached_key 2019-02-12 22:26:44 -08:00
alloc.rs liballoc: revert nested imports style changes. 2019-02-03 08:27:44 +01:00
borrow.rs libs: doc comments 2019-02-10 23:57:25 +00:00
boxed.rs Rollup merge of #58429 - RalfJung:box, r=TimNN 2019-02-16 14:11:41 +08:00
boxed_test.rs liballoc: revert nested imports style changes. 2019-02-03 08:27:44 +01:00
Cargo.toml liballoc => edition = 2018. 2019-02-02 08:36:03 +01:00
fmt.rs tests: doc comments 2019-02-10 23:42:32 +00:00
lib.rs Merging master 2019-02-12 22:46:14 -08:00
macros.rs Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnik 2019-02-12 19:09:24 +00:00
prelude.rs liballoc: revert nested imports style changes. 2019-02-03 08:27:44 +01:00
raw_vec.rs libs: doc comments 2019-02-10 23:57:25 +00:00
rc.rs libs: doc comments 2019-02-10 23:57:25 +00:00
slice.rs Revert "Remove mentions of unstable sort_by_cached key from stable documentation" 2019-02-12 22:26:44 -08:00
str.rs Move str::escape_* to libcore 2019-02-12 09:55:30 +01:00
string.rs libs: doc comments 2019-02-10 23:57:25 +00:00
sync.rs libs: doc comments 2019-02-10 23:57:25 +00:00
vec.rs libs: doc comments 2019-02-10 23:57:25 +00:00