File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,17 @@ In this document, *layout* and *representation* are not synonyms.
61
61
62
62
#### Niche
63
63
64
- Invalid bit-patters that will be used by layout optimizations.
64
+ Invalid bit-patterns that will be used by layout optimizations.
65
65
66
66
For example, ` &mut T ` has at least one niche, the "all zeros" bit-pattern. This
67
67
niche is used by layout optimizations like "` enum ` discriminant elision" to
68
68
guarantee that ` Option<&mut T> ` has the same size as ` &mut T ` .
69
69
70
+ While all niches are invalid bit-patterns, not all invalid bit-patterns are
71
+ niches. For example, the "all bits uninitialized" is an invalid bit-pattern for
72
+ ` &mut T ` , but this bit-pattern is not used by layout optimizations, and is not a
73
+ niche.
74
+
70
75
71
76
### TODO
72
77
You can’t perform that action at this time.
0 commit comments