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 7f62c3c commit 9430002Copy full SHA for 9430002
_posts/2017-07-20-Rust-1.19.md
@@ -42,7 +42,9 @@ union MyUnion {
42
Unions are kind of like `enum`s, but they are "untagged". Enums have a "tag"
43
that stores which variant is the correct one at runtime; unions elide this tag.
44
45
-That means that reading or writing a union's field is unsafe:
+Since we can interpret the data held in the union using the wrong variant and
46
+Rust can't check this for us, that means reading or writing a union's field is
47
+unsafe:
48
49
```rust
50
let u = MyUnion { f1: 1 };
0 commit comments