]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-big-enum.rs
Merge branch 'debian/sid' into debian/experimental
[rustc.git] / src / test / ui / consts / const-big-enum.rs
1 // run-pass
2
3 enum Foo {
4 Bar(u32),
5 Baz,
6 Quux(u64, u16)
7 }
8
9 static X: Foo = Foo::Baz;
10
11 pub fn main() {
12 match X {
13 Foo::Baz => {}
14 _ => panic!()
15 }
16 match Y {
17 Foo::Bar(s) => assert_eq!(s, 2654435769),
18 _ => panic!()
19 }
20 match Z {
21 Foo::Quux(d,h) => {
22 assert_eq!(d, 0x123456789abcdef0);
23 assert_eq!(h, 0x1234);
24 }
25 _ => panic!()
26 }
27 }
28
29 static Y: Foo = Foo::Bar(2654435769);
30 static Z: Foo = Foo::Quux(0x123456789abcdef0, 0x1234);