blob: 6bbafbf1434efc990cd50f318647fce043747c7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#![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,
}
|