1 A `repr(transparent)` type was also annotated with other, incompatible
4 Erroneous code example:
7 #[repr(transparent, C)] // error: incompatible representation hints
11 A type annotated as `repr(transparent)` delegates all representation concerns to
12 another type, so adding more representation hints is contradictory. Remove
13 either the `transparent` hint or the other hints, like this:
20 Alternatively, move the other attributes to the contained type:
30 struct FooWrapper(Foo);
33 Note that introducing another `struct` just to have a place for the other
34 attributes may have unintended side effects on the representation:
44 struct Grams2(Float); // this is not equivalent to `Grams` above
47 Here, `Grams2` is a not equivalent to `Grams` -- the former transparently wraps
48 a (non-transparent) struct containing a single float, while `Grams` is a
49 transparent wrapper around a float. This can make a difference for the ABI.