We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e88dc3d commit a057fa2Copy full SHA for a057fa2
reference/src/layout/unions.md
@@ -85,6 +85,8 @@ assert_eq!(size_of::<U>(), 2);
85
# }
86
```
87
88
-**C++ compatibility hazard**: C++ does, in general, give a size of 1 to empty
89
-structs. If an empty struct in C++ is used as an union field, a "naive"
90
-translation of that code into Rust will not produce a compatible result.
+**C++ compatibility hazard**: C++ does, in general, give a size of 1 to types
+with no fields. When such types are used as an union field in C++, a "naive"
+translation of that code into Rust will not produce a compatible result. Refer
91
+to the [struct chapter](structs-and-tuples.md#c-compatible-layout-repr-c) for
92
+further details.
0 commit comments