Skip to content

std::repr does not work properly for packed fields #13486

Description

@stepancheg

Problem with std::repr (and with std::reflect) is that TyVisitor does not tell whether struct is packed or not.

I think, proper solution would be adding offset parameter to fn visit_class_field(...) callback, to remove all complex offsets/alignment computation code from libstd (because it is already done in librustc).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions