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

Topic: stricter-unions

eddyb (Sep 13 2018 at 08:28, on Zulip):

@RalfJ @nikomatsakis I might be wrong, but we could have an opt-in for unions that are closer in their semantics to enums, where variants are effectively disjoint in their accesses, and using the union to "transmute" would be UB

nikomatsakis (Sep 13 2018 at 14:18, on Zulip):

probably, yes

RalfJ (Sep 17 2018 at 17:41, on Zulip):

Why does this SmallVec optimization need extra union behavior?

RalfJ (Sep 17 2018 at 17:42, on Zulip):

I am somewhat doubtful about any notion of an "active variant"... that'd somehow have to be stored in "shadow data" on the abstract machine, and it is not clear to me where that data would live and how we would even know to access it

Last update: May 27 2020 at 23:05UTC