Skip to content

No drop flag check for DST structs #16758

Closed
@nrc

Description

@nrc

Since drop flags come after all named fields and the last field in a DST struct is unsized, finding the drop flag is a bit tricky. Therefore, it is currently not checked. A possible fix is to find the alignment by taking the size of the struct from its vtable and subtracting the size of the drop flag. However, since the plan is to remove the drop flag anyway (#5016), I have just left a FIXME and issue a warning when we skip the check.

cc @pnkfelix

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions