Standardize whether T: KnownLayout
requires T
's fields to be KnownLayout
#1162
Labels
blocking-next-release
This issue should be resolved before we release on crates.io
Progress
KnownLayout for Unalign<T>
to requireT: KnownLayout
(add a test to confirm this behavior doesn't regress)feature = "derive"
- without aT: KnownLayout
bound) is to be forwards-compatible with supporting unsizedUnalign
(#209)impl_or_verify!
to supportKnownLayout
- theUnalign
bounds issue wasn't caught because, forKnownLayout
, we useimpl_known_layout!
rather thanimpl_or_verify!
T: KnownLayout
never requires its fields to beKnownLayout
Details
Relates to #29.
Consider the following code:
Since
T
has an implicitT: Sized
bound, our emitted derive should not require thatT: KnownLayout
, but it does. This is currently affectingUnalign
, resulting in it having a different bound when compiling withfeature = "derive"
(namely,T: KnownLayout
) than when compiling withoutfeature = "derive"
.The text was updated successfully, but these errors were encountered: