Packed unsized struct with drop: Confusing error message #47068
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following type
raises the following error
The last line of the note here is pretty confusing, because this is the last field! The actual problem is that a packed struct implementing
Drop
copies things around for dropping to get the right alignment, and that requires the field to be sized.The text was updated successfully, but these errors were encountered: