//@ build-pass pub enum Register { Field0 = 40, Field1, } fn main() { let _b = Register::<0>::Field1 as u16; }