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

bitflags! uses associated constants #24921

Merged
merged 3 commits into from
Apr 30, 2015

Conversation

tamird
Copy link
Contributor

@tamird tamird commented Apr 29, 2015

Depends on #24888. r? @alexcrichton

@alexcrichton
Copy link
Member

Now that #24888 has landed, could you rebase this as well?

@alexcrichton
Copy link
Member

Fascinating! Were the changes from constants like 0b001 to 1 << 0 stylistic or because of an ICE?

@tamird
Copy link
Contributor Author

tamird commented Apr 29, 2015

Done!

@tamird
Copy link
Contributor Author

tamird commented Apr 29, 2015

@alexcrichton stylistic :)

@tamird
Copy link
Contributor Author

tamird commented Apr 29, 2015

It's probably a bit of an anti-pattern to have a constant that represents the empty set of flags, since bitflags! provides that method. something to revisit in a subsequent PR

@alexcrichton
Copy link
Member

Yeah it looks like there's a number of stylistic things that may want to be tweaked now that the flags are scoped. For example all of the LLVM attributes end with Attribute but now that they're scoped under the name Attribute that's a little redundant. It's fine to leave things like that to later though!

@bors: r+ 8c58fe1

@tamird tamird mentioned this pull request Apr 29, 2015
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Apr 29, 2015
@bors bors merged commit 8c58fe1 into rust-lang:master Apr 30, 2015
@tamird tamird deleted the bitflags-associated-const branch April 30, 2015 02:04
bors added a commit that referenced this pull request May 7, 2015
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.

3 participants