Closed
Description
Hey,
I'm curious about the unsafe cast in Path.
From what I understand: this works because Path is a single member struct containing only the type it's being reinterpreted as.
My original question on #rust IRC was: Is this always guaranteed to be correct (in Rust) in terms of memory layout?
The discussion seemed to hint at that this is in fact not a guarantee, but that std is in a unique position being developed in concert with the language and any future breakage would be patched when it occurs.
I would love some clarification if this usage is correct or to what degree it is not. I'd also suggest we add clarification around this case with comments or support functions to aid future spelunking into std.