]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | // run-pass |
0bf4aa26 | 2 | #![allow(dead_code)] |
c34b1796 | 3 | |
223e47cc LB |
4 | enum Foo { |
5 | Bar, | |
6 | Baz, | |
7 | Boo, | |
8 | } | |
9 | ||
1a4d82fc | 10 | static X: Foo = Foo::Bar; |
223e47cc LB |
11 | |
12 | pub fn main() { | |
13 | match X { | |
1a4d82fc JJ |
14 | Foo::Bar => {} |
15 | Foo::Baz | Foo::Boo => panic!() | |
223e47cc LB |
16 | } |
17 | match Y { | |
1a4d82fc JJ |
18 | Foo::Baz => {} |
19 | Foo::Bar | Foo::Boo => panic!() | |
223e47cc LB |
20 | } |
21 | } | |
22 | ||
1a4d82fc | 23 | static Y: Foo = Foo::Baz; |