[![Build Status](https://travis-ci.org/Matt8898/auto-bitflags.svg?branch=master)](https://travis-ci.org/Matt8898/auto-bitflags) # auto-bitflags --- auto-bitflags is a rust macro to automatically generate bitflags. ---- ## Usage #[macro_use] extern crate auto_bitflags; auto-bitflags!(u32, FLAG1, FLAG2); fn main() { assert_eq!(0b11, FLAG_FLAG1 | FLAG_FLAG2); let flag12 = FLAG_FLAG1 | FLAG_FLAG2; assert_eq!(0b1, flag12 & FLAG_FLAG2); assert_eq!(0b10, flag12 & FLAG_FLAG1); }