You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// We can't use a padding check since there are generic type arguments.
782
781
// Instead, we require all field types to implement `Unaligned`. This
783
782
// ensures that the `repr(C)` layout algorithm will not insert any
784
-
// padding.
783
+
// padding unless #[repr(align)] explicitly adds padding, which we check
784
+
// for in this branch's condition.
785
785
//
786
786
// TODO(#10): Support type parameters for non-transparent, non-packed
787
787
// structs without requiring `Unaligned`.
788
-
//
789
-
// TODO(#1763): This is probably unsound! Fix it.
790
788
(None,true)
791
789
}else{
792
790
returnErr(Error::new(Span::call_site(),"must have a non-align #[repr(...)] attribute or #[repr(packed)] in order to guarantee this type's memory layout"));
0 commit comments