File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -70,12 +70,13 @@ will always be respected. If a pointer to a non-aligned structure exists and is
70
70
used then it is considered unsafe behavior. Local variables, objects in arrays,
71
71
statics, etc, will all respect the custom alignment specified for a type.
72
72
73
- For now, it will be illegal to mix ` #[repr(align)] ` and ` #[repr(packed)] ` in
74
- structs. Specifically, both attributes cannot be applied on the same struct, and
75
- a ` #[repr(packed)] ` struct cannot transitively contain another struct with
76
- ` #[repr(align)] ` or vice versa. The behavior of MSVC and gcc differ in how these
77
- properties interact, and for now we'll just yield an error while we get
78
- experience with the two attributes.
73
+ For now, it will be illegal for any ` #[repr(packed)] ` struct to transitively
74
+ contain a struct with ` #[repr(align)] ` . Specifically, both attributes cannot be
75
+ applied on the same struct, and a ` #[repr(packed)] ` struct cannot transitively
76
+ contain another struct with ` #[repr(align)] ` . The flip side, including a
77
+ ` #[repr(packed)] ` structure inside of a ` #[repr(align)] ` one will be allowed.
78
+ The behavior of MSVC and gcc differ in how these properties interact, and for
79
+ now we'll just yield an error while we get experience with the two attributes.
79
80
80
81
Some examples of ` #[repr(align)] ` are:
81
82
You can’t perform that action at this time.
0 commit comments