Skip to content

Commit cceb00f

Browse files
committed
Relate niche to validity invariant
1 parent ad5cb95 commit cceb00f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

reference/src/layout/enums.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,11 @@ as a niche.
321321
322322
[`NonZeroU8`]: https://doc.rust-lang.org/std/num/struct.NonZeroU8.html
323323
324-
The niche values of a type are parts of its validity invariant which, as of this
325-
writing, is the current active discussion topic in the unsafe code guidelines
326-
process. [rust-lang/rust#60300] specifies that the following types have at least
327-
one niche (the all-zeros bit-pattern):
324+
The niche values must be disjoint from the values allowed by the validity
325+
invariant. The validity invariant is, as of this writing, is the current active
326+
discussion topic in the unsafe code guidelines process. [rust-lang/rust#60300]
327+
specifies that the following types have at least one niche (the all-zeros
328+
bit-pattern):
328329
329330
* `&T`
330331
* `&mut T`

0 commit comments

Comments
 (0)