Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::bitflags declaration does not allow trailing comma #16469

Closed
chuckries opened this issue Aug 13, 2014 · 3 comments · Fixed by #16986
Closed

std::bitflags declaration does not allow trailing comma #16469

chuckries opened this issue Aug 13, 2014 · 3 comments · Fixed by #16986

Comments

@chuckries
Copy link
Contributor

From the docs, this works:

bitflags!(
    flags Flags: u32 {
        static FlagA       = 0x00000001,
        static FlagB       = 0x00000010,
        static FlagC       = 0x00000100
    }
)

This would not:

bitflags!(
    flags Flags: u32 {
        static FlagA       = 0x00000001,
        static FlagB       = 0x00000010,
        static FlagC       = 0x00000100,
    }
)
@chuckries
Copy link
Contributor Author

the macro for vec! does not have this issue.

@aturon
Copy link
Member

aturon commented Aug 13, 2014

cc @bjz

@brendanzab
Copy link
Member

I agree, this is ugly. I will see if I can fix it.

bors added a commit that referenced this issue Sep 4, 2014
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this issue Feb 5, 2024
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 a pull request may close this issue.

3 participants