@@ -61,10 +61,12 @@ The *layout* of a type defines:
61
61
* its [ niches] [ Niche ] ,
62
62
* its call abi.
63
63
64
+ Note: due to discriminant-elision optimizations, niches are required to compute
65
+ the layout of, e.g., ` Option<T> ` , from the layout of ` T ` .
66
+
64
67
Note: Originally, * layout* and * representation* were treated as synonyms, and Rust language features like the ` #[repr] ` attribute reflect this.
65
68
In this document, * layout* and * representation* are not synonyms.
66
69
67
- <<<<<<< HEAD
68
70
#### Niche
69
71
70
72
The * niche* of a type determines invalid bit-patterns that will be used by layout optimizations.
@@ -78,16 +80,12 @@ While all niches are invalid bit-patterns, not all invalid bit-patterns are
78
80
niches. For example, the "all bits uninitialized" is an invalid bit-pattern for
79
81
` &mut T ` , but this bit-pattern cannot be used by layout optimizations, and is not a
80
82
niche.
81
- =======
82
- Note: due to discriminant-elision optimizations, niches are required to compute
83
- the layout of, e.g., ` Option<T> ` , from the layout of ` T ` .
84
- >>>>>>> Add note about why niches need to be part of the layout
85
83
86
84
#### Call ABI
87
85
88
86
The * call ABI* determines how a type is passed * by value* across a function boundary.
89
87
90
- Note: The call ABI is not stable. Currently, it is one of:
88
+ Note: The set of possible call ABIs is not stable. Currently, it consists of:
91
89
92
90
``` rust,ignore
93
91
enum Abi {
0 commit comments