enumflags
enumflags copied to clipboard
In the cloned repo, the enumflags crate is version "0.3.0" and the enumflags_derive crate is "0.4.0", but on crates.io they are both "0.4.1"
```rust extern crate enumflags; #[macro_use] extern crate enumflags_derive; #[derive(EnumFlags, Copy, Clone)] enum Foo { A = 1, } ``` ``` warning: cannot find type `Foo` in this scope --> src/main.rs:5:10...
Repro: ```rust extern crate enumflags; #[macro_use] extern crate enumflags_derive; #[derive(EnumFlags, Copy, Clone, Debug)] #[repr(u64)] enum Bork { X = 0x40_0000_0000 } ``` Error: ``` error: proc-macro derive panicked --> src/lib.rs:5:10...
Since it's defined directly on the type rather than a trait, the compiler will warn about it being unused. Can it be turned off?
https://github.com/rust-lang/rust/issues/10374 Because of that bug, we can't really use enumflags when we need to serialize to an architecture dependent size. For example: `std::os::raw::c_ulong`. We can either try to get it...
``` #[derive(EnumFlags, Copy, Clone, Debug)] #[repr(u8)] pub enum GeneralStatus { INDICATOR_IDENTIFY = 0b01000000, INDICATOR_MUTE = 0b10000000, INDICATOR_NORMAL = 0b11000000, PORT_AUTH_PANEL = 0b00010000, PORT_AUTH_NETWORK = 0b00100000, BOOT_ROM = 0b00000100, RDM_CAPABLE =...