blob: cf751cb407cfb3493470923a6cc08cf684592a94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
enum Empty {}
enum NonEmpty {
Foo(i32),
}
fn f(e: Empty) {
match e {
Empty(0) => {} // { dg-error "expected tuple struct or tuple variant, found enum 'Empty'" }
}
match e {
Empty(Empty(..)) => {} // { dg-error "expected tuple struct or tuple variant, found enum 'Empty'" }
}
}
fn g(e: NonEmpty) {
match e {
NonEmpty(0) => {} // { dg-error "expected tuple struct or tuple variant, found enum 'NonEmpty'" }
}
}
|