Open
Description
The union RFC says:
In addition, since a union declared without
#[repr(C)]
uses an unspecified binary layout, code reading fields of such a union or pattern-matching such a union must not read from a field other than the one written to.
However, there are several cases which explicitly read from a field different from the one written to, for example, str.as_bytes()
which was introduced in #50863 to make many of the stuff const
.