mirror of https://github.com/rust-lang/reference
commit
846bdbb818
|
@ -61,7 +61,7 @@ non-zero offset (except when [the C representation] is used); in that case the
|
|||
bits starting at the offset of the fields are read. It is the programmer's
|
||||
responsibility to make sure that the data is valid at the field's type. Failing
|
||||
to do so results in [undefined behavior]. For example, reading the value `3`
|
||||
through of a field of the [boolean type] is undefined behavior. Effectively,
|
||||
from a field of the [boolean type] is undefined behavior. Effectively,
|
||||
writing to and then reading from a union with [the C representation] is
|
||||
analogous to a [`transmute`] from the type used for writing to the type used for
|
||||
reading.
|
||||
|
|
Loading…
Reference in New Issue