Skip to content

Alignment on variables is lost #625

Open

Description

@lucic71

Rust has no natural way of expressing alignas(16) char buffer[3];. This is true for local, global variables and data members of class.

The closest is:

#[repr(align(16))]
struct Align16<T>(T);

This means that such variables have to be accessed with .0

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