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

rework the way cfgs are handled #281

Merged
merged 9 commits into from May 10, 2022
Merged

Conversation

KodrAus
Copy link
Member

@KodrAus KodrAus commented May 3, 2022

Closes #137
Closes #198
Closes #215

The current approach for handling #[cfg]'d flags is to define a trait that includes all names unconditionally, and then only set them to values based on actual #[cfg]'s. Unfortunately this means we can't support redefining flags (they'd appear twice in the unconditional list). This approach simplifies things by defining an internal Bits trait that captures the operations we require of primitive bits types. We now define all as from_bits_truncate with all bits set.

@KodrAus
Copy link
Member Author

KodrAus commented May 3, 2022

r? @arturoc

@KodrAus
Copy link
Member Author

KodrAus commented May 4, 2022

Getting back to having a single macro that defines bitflags types should make it much easier for us to do #264 properly. After that I think we're just about ready for the next major release (the first with the BitFlags trait).

@KodrAus KodrAus merged commit 810dc35 into bitflags:main May 10, 2022
@hillin
Copy link

hillin commented Aug 16, 2022

When is this change going to be released?

@hillin
Copy link

hillin commented Aug 18, 2022

@KodrAus Is there a plan to release with this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants