Skip to content

Instantly share code, notes, and snippets.

@Ms2ger
Last active November 16, 2015 17:10
Show Gist options
  • Save Ms2ger/5dd2268cb37176076856 to your computer and use it in GitHub Desktop.
Save Ms2ger/5dd2268cb37176076856 to your computer and use it in GitHub Desktop.
bitflags
[package]
name = "bitflags"
version = "0.1.0"
authors = ["Ms2ger <Ms2ger@gmail.com>"]
[lib]
path = "lib.rs"
[dependencies]
bitflags = "*"
#[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