]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const-nullary-enum.rs
Merge branch 'debian/sid' into debian/experimental
[rustc.git] / src / test / ui / consts / const-nullary-enum.rs
CommitLineData
b7449926 1// run-pass
0bf4aa26 2#![allow(dead_code)]
c34b1796 3
223e47cc
LB
4enum Foo {
5 Bar,
6 Baz,
7 Boo,
8}
9
1a4d82fc 10static X: Foo = Foo::Bar;
223e47cc
LB
11
12pub 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 23static Y: Foo = Foo::Baz;