Skip to content

Commit 34592df

Browse files
committed
Make C++ wording correct
1 parent a5ca961 commit 34592df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: reference/src/layout/unions.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ assert_eq!(size_of::<U>(), 2);
6464
#### Zero-sized fields
6565

6666
If a `#[repr(C)]` union contains a field of zero-size, that field does not
67-
occupy space in Rust unions (as opposed to, e.g., in C++). For example:
67+
occupy space in Rust unions, e.g., as opposed to _empty_ types in C++ unions,
68+
which might occupy space depending on how they are used. For example:
6869

6970
```rust
7071
# use std::mem::{size_of, align_of};

0 commit comments

Comments
 (0)