Last active
November 16, 2015 17:10
-
-
Save Ms2ger/5dd2268cb37176076856 to your computer and use it in GitHub Desktop.
bitflags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "bitflags" | |
version = "0.1.0" | |
authors = ["Ms2ger <[email protected]>"] | |
[lib] | |
path = "lib.rs" | |
[dependencies] | |
bitflags = "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] | |
extern crate bitflags; | |
mod foo { | |
bitflags! { | |
flags InlineFragmentNodeFlags: u8 { | |
const FIRST_FRAGMENT_OF_ELEMENT = 0x01, | |
const LAST_FRAGMENT_OF_ELEMENT = 0x02, | |
} | |
} | |
} | |
pub fn blah() { | |
assert!(foo::FIRST_FRAGMENT_OF_ELEMENT != foo::LAST_FRAGMENT_OF_ELEMENT); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment