Skip to content

Conversation

@rbakbashev
Copy link
Contributor

The repr() attribute allows definitions to be specified in any order:

#[repr(C, align(64))]
struct Foo(i32);

#[repr(align(64), C)]
struct Bar(i32);

They can also only have Alignment present:

#[repr(align(64))]
struct Baz(i32);

And a trailing comma:

#[repr(packed,)]
struct Qux(i32);

In addition, previous version of the Representation category did not require a delimiting comma (repr(C packed)).

To fix these issues, introduce a list of representations.

The `repr()` attribute allows definitions to be specified in any order:

    #[repr(C, align(64))]
    struct Foo(i32);

    #[repr(align(64), C)]
    struct Bar(i32);

They can also only have `Alignment` present:

    #[repr(align(64))]
    struct Baz(i32);

And a trailing comma:

    #[repr(packed,)]
    struct Qux(i32);

In addition, previous version of the `Representation` category did not
require a delimiting comma (`repr(C packed)`).

To fix these issues, introduce a list of representations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant