Stream: t-lang/wg-unsafe-code-guidelines

Topic: stacked borrows: Box with a unique tag

RalfJ (Nov 21 2018 at 09:30, on Zulip):

So I made Box be treated like &mut, exploiting that it is a lang item. That gives us some nice extra guarantees. However, how I am having trouble with Box::into_unique... I somehow need to erase the tag and trigger and EscapeToRaw, and that is not trivial :/ I mean I could always use transmute, but that does not seem nice.
Cc @nikomatsakis @Gankro

RalfJ (Nov 21 2018 at 12:37, on Zulip):

Ah, I found a way

RalfJ (Nov 21 2018 at 12:58, on Zulip):

See #56133

RalfJ (Nov 21 2018 at 14:20, on Zulip):

actually... I don't even want barriers for boxes. then things pass without that PR, though I have to make sure I understand why.

Last update: Jul 03 2020 at 17:50UTC