Skip to content

Commit 0f03acd

Browse files
committed
clarify that the tautological assumption that a zero-sized field has zero-size is not that common
1 parent b385179 commit 0f03acd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reference/src/layout/unions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ 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 the union. For example:
67+
occupy space in Rust unions (as opposed to, e.g., in C++). For example:
6868

6969
```rust
7070
# use std::mem::{size_of, align_of};

0 commit comments

Comments
 (0)