unsized generic field not allowed in repr(packed) struct #49903
Labels
A-repr-packed
Area: the naughtiest repr
A-type-system
Area: Type system
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
For some reason, using a generic
T: ?Sized
does not work in arepr(packed)
struct, while a non-generic unsized type is OK.An non-
packed
is also OK:struct Foo<T: ?Sized>(T); // ok
The full error:
This may be related to #47068?
Meta
The text was updated successfully, but these errors were encountered: