MaikKlein / enumflags

24 stars 7 forks source link

proc-macro derive panicked with #[repr(u64)]: assertion failed: index < std::u32::MAX as usize #16

Open tarcieri opened 6 years ago

tarcieri commented 6 years ago

Repro:

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
  |
5 | #[derive(EnumFlags, Copy, Clone, Debug)]
  |          ^^^^^^^^^
error: proc-macro derive panicked
 --> src/lib.rs:5:10
  |
5 | #[derive(EnumFlags, Copy, Clone, Debug)]
  |          ^^^^^^^^^
  |
  |
  = help: message: assertion failed: index < std::u32::MAX as usize
  = help: message: assertion failed: index < std::u32::MAX as usize