File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -117,16 +117,14 @@ have the same representation as their underlying types.
117
117
118
118
[ RFC 1649 ] : https://github.com/rust-lang/rfcs/pull/1649
119
119
120
- This new representation cannot be used with any other representation attribute
121
- but alignment, to be able to specify a transparent wrapper with additional
122
- alignment constraints:
120
+ This new representation cannot be used with any other representation attribute:
123
121
124
122
``` rust
125
123
#[repr(transparent, align = " 128" )]
126
- struct OverAligned (f64 ); // Behaves as a bare f64 with 128 bits alignment .
124
+ struct BogusAlign (f64 ); // Error, must be aligned like the underlying type .
127
125
128
126
#[repr(C , transparent)]
129
- struct BogusRepr (f64 ); // Nonsensical , repr cannot be C and transparent.
127
+ struct BogusRepr (f64 ); // Error , repr cannot be C and transparent.
130
128
```
131
129
132
130
As a matter of optimisation, eligible ` #[repr(Rust)] ` structs behave as if
You can’t perform that action at this time.
0 commit comments