@@ -128,7 +128,8 @@ struct ThreeInts {
128
128
```
129
129
130
130
The alignment may be raised or lowered with the ` align ` and ` packed ` modifiers
131
- respectively. They alter the representation specified in the attribute:
131
+ respectively. They alter the representation specified in the attribute.
132
+ If no representation is specified, the default one is altered.
132
133
133
134
``` rust
134
135
// Default representation, alignment lowered to 2.
@@ -156,7 +157,7 @@ struct AlignedStruct {
156
157
The representation of a type can change the padding between fields, but does
157
158
not change the layout of the fields themselves. For example, a struct with a
158
159
` C ` representation that contains a struct ` Inner ` with the default
159
- representation will not change the layout of Inner.
160
+ representation will not change the layout of ` Inner ` .
160
161
161
162
### The Default Representation
162
163
@@ -317,13 +318,13 @@ only be applied to the default and `C` representations.
317
318
The ` packed ` modifier can be used on ` struct ` s and ` union ` s to lower the
318
319
alignment of the type to a given value.
319
320
320
- The packing value is specified as an integer parameter in the form of
321
+ The packing value (hence: "value") is specified as an integer parameter in the form of
321
322
` #[repr(packed(x))] ` . If no value is given, as in ` #[repr(packed)] ` , then the
322
- packing value is 1. The packing value must be a power of two from 1 up to
323
+ value is 1. The value must be a power of two from 1 up to
323
324
2<sup >29</sup >.
324
325
325
- The ` packed ` modifier lowers the type's alignment to the specified packing . If
326
- the specified packing is greater to the alignment of the type without the
326
+ The ` packed ` modifier lowers the type's alignment to the specified value . If
327
+ the specified value is greater than the type's alignment without the
327
328
` packed ` modifier, then the alignment and layout is unaffected. The alignments
328
329
of each field, for the purpose of positioning fields, is the smaller of the
329
330
specified packing and the alignment of the field's type.
0 commit comments