We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20922ac commit 224303dCopy full SHA for 224303d
src/items/unions.md
@@ -40,7 +40,7 @@ let f = u.f1;
40
Unions have no notion of an "active field". Instead, every union access just
41
interprets the storage at the type of the field used for the access. Reading a
42
union field is equivalent to a [`transmute`]: The data in the union, no matter
43
-how it was stored there, is transmuted to the type if the field. Reading data
+how it was stored there, is transmuted to the type of the field. Reading data
44
at a bad type results in undefined behavior (for example, reading the value `3`
45
at type `bool`). For this reason, all reads of union fields have to be placed
46
in `unsafe` blocks:
0 commit comments