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

Allow multiple bitflags in one macro invocation #212

Closed
wants to merge 5 commits into from

Conversation

konsumlamm
Copy link
Contributor

@konsumlamm konsumlamm commented Feb 12, 2020

Add support for multiple bitflags in one macro invocation, for example:

bitflags! {
    pub struct Flags1: u32 {
        const A = 0b00000001;
    }

    struct Flags2: u32 {
        const B = 0b00000010;
    }
}

The changes to the macro are backwards compatible, so I changed the version to "1.3.0".
I also updated the documentation and replaced mentions of the flags keyword (which was used before 0.9) with struct.

update documentation
change mentions of the `flags` keyword (used before 0.9) to `struct`
@konsumlamm
Copy link
Contributor Author

konsumlamm commented Feb 12, 2020

Note that the CI is only failing, because the expected error message for test_suite/tests/compile-fail/private_flags.rs is different on nightly. That is not caused by this commit. See #213.

@konsumlamm
Copy link
Contributor Author

Any opinion on this?

@konsumlamm
Copy link
Contributor Author

Closed in favor of #235.

@konsumlamm konsumlamm closed this Dec 27, 2020
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.

None yet

3 participants