]> git.proxmox.com Git - rustc.git/blobdiff - src/test/run-pass/const-enum-vector.rs
Imported Upstream version 1.0.0~beta
[rustc.git] / src / test / run-pass / const-enum-vector.rs
index 3dc5b918f7f583db6518f2c6b8093caeae0db652..6fdf0c3948fa0584452c04e540696529e59e7f69 100644 (file)
@@ -8,16 +8,18 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum E { V1(int), V0 }
-static C: [E, ..3] = [V0, V1(0xDEADBEE), V0];
+// pretty-expanded FIXME #23616
+
+enum E { V1(isize), V0 }
+static C: [E; 3] = [E::V0, E::V1(0xDEADBEE), E::V0];
 
 pub fn main() {
     match C[1] {
-        V1(n) => assert!(n == 0xDEADBEE),
-        _ => fail!()
+        E::V1(n) => assert!(n == 0xDEADBEE),
+        _ => panic!()
     }
     match C[2] {
-        V0 => (),
-        _ => fail!()
+        E::V0 => (),
+        _ => panic!()
     }
 }