blob: fccfe53f40d34f8cbad54234af8d761d80974e26 [file] [log] [blame]
//@ aux-build:enums.rs
extern crate enums;
use enums::FieldLessWithNonExhaustiveVariant;
fn main() {
let e = FieldLessWithNonExhaustiveVariant::default();
let d = e as u8; //~ ERROR casting `FieldLessWithNonExhaustiveVariant` as `u8` is invalid [E0606]
assert_eq!(d, 0);
}