File tree 1 file changed +5
-6
lines changed
reference/src/representation
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -262,12 +262,11 @@ which specifies that `Foo` should use the ABI rules for its field
262
262
type, ` u32 ` . This is useful when using "wrapper structs" in Rust to
263
263
give stronger typing guarantees.
264
264
265
- ` #[repr(transparent)] ` cannot be applied to * any* struct. It is
266
- limited to structs with a single field whose type ` T ` has non-zero
267
- size, along with some number of other fields whose types are all
268
- zero-sized (typically ` std::marker::PhantomData ` fields). The struct
269
- then takes on the "ABI behavior" of the type ` T ` that has non-zero
270
- size.
265
+ ` #[repr(transparent)] ` can only be applied to structs with a single
266
+ field whose type ` T ` has non-zero size, along with some number of
267
+ other fields whose types are all zero-sized (typically
268
+ ` std::marker::PhantomData ` fields). The struct then takes on the "ABI
269
+ behavior" of the type ` T ` that has non-zero size.
271
270
272
271
(Note further that the Rust ABI is undefined and theoretically may
273
272
vary from compiler revision to compiler revision.)
You can’t perform that action at this time.
0 commit comments