Skip to content

Commit f146fc4

Browse files
committed
rephrase "any" struct for clarity
1 parent b0c86ea commit f146fc4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

reference/src/representation/structs-and-tuples.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,11 @@ which specifies that `Foo` should use the ABI rules for its field
262262
type, `u32`. This is useful when using "wrapper structs" in Rust to
263263
give stronger typing guarantees.
264264

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.
271270

272271
(Note further that the Rust ABI is undefined and theoretically may
273272
vary from compiler revision to compiler revision.)

0 commit comments

Comments
 (0)