blob: 6bbafbf1434efc990cd50f318647fce043747c7b [file] [log] [blame]
#![crate_type = "lib"]
// Test that if any variant is non-unit,
// we need a repr.
enum Enum {
//~^ ERROR `#[repr(inttype)]` must be specified
Unit = 1,
Tuple(),
Struct {},
}
// Test that if any non-unit variant has an explicit
// discriminant we need a repr.
enum Enum2 {
//~^ ERROR `#[repr(inttype)]` must be specified
Tuple() = 2,
}