@@ -88,7 +88,7 @@ String slices are a UTF-8 representation of characters that have the same layout
88
88
89
89
## Tuple Layout
90
90
91
- Tuples are laid out according to the [ default representation] [ Default ] .
91
+ Tuples are laid out according to the [ ` Rust ` representation] [ `Rust` ] .
92
92
93
93
The exception to this is the unit tuple (` () ` ), which is guaranteed as a
94
94
zero-sized type to have a size of 0 and an alignment of 1.
@@ -110,7 +110,7 @@ All user-defined composite types (`struct`s, `enum`s, and `union`s) have a
110
110
* representation* that specifies what the layout is for the type. The possible
111
111
representations for a type are:
112
112
113
- - [ Default ]
113
+ - [ ` Rust ` ] (default)
114
114
- [ ` C ` ]
115
115
- The [ primitive representations]
116
116
- [ ` transparent ` ]
@@ -159,10 +159,12 @@ not change the layout of the fields themselves. For example, a struct with a
159
159
` C ` representation that contains a struct ` Inner ` with the default
160
160
representation will not change the layout of ` Inner ` .
161
161
162
- ### The Default Representation
162
+ ### < a id = " the-default-representation " ></ a > The ` Rust ` Representation
163
163
164
- Nominal types without a ` repr ` attribute have the default representation.
165
- Informally, this representation is also called the ` rust ` representation.
164
+ The ` Rust ` representation is the default representation for nominal types
165
+ without a ` repr ` attribute. Using this representation explicitly through a
166
+ ` repr ` attribute is guaranteed to be the same as omitting the attribute
167
+ entirely.
166
168
167
169
The only data layout guarantees made by this representation are those required
168
170
for soundness. They are:
@@ -543,7 +545,7 @@ important consequence of these rules is that a type with `#[repr(packed(1))]`
543
545
544
546
The ` align ` and ` packed ` modifiers cannot be applied on the same type and a
545
547
` packed ` type cannot transitively contain another ` align ` ed type. ` align ` and
546
- ` packed ` may only be applied to the [ default ] and [ ` C ` ] representations.
548
+ ` packed ` may only be applied to the [ ` Rust ` ] and [ ` C ` ] representations.
547
549
548
550
The ` align ` modifier can also be applied on an ` enum ` .
549
551
When it is, the effect on the ` enum ` 's alignment is the same as if the ` enum `
@@ -604,7 +606,7 @@ used with any other representation.
604
606
[undefined behavior ]: behavior - considered - undefined . md
605
607
[55149 ]: https : // github.com/rust-lang/rust/issues/55149
606
608
[`PhantomData <T >`]: special - types - and - traits . md#phantomdatat
607
- [Default ]: #the - default - representation
609
+ [` Rust ` ]: #the - rust - representation
608
610
[`C `]: #the - c - representation
609
611
[primitive representations ]: #primitive - representations
610
612
[structs ]: items / structs . md
0 commit comments