]> git.proxmox.com Git - rustc.git/blobdiff - src/test/run-pass/const-enum-structlike.rs
Imported Upstream version 1.2.0+dfsg1
[rustc.git] / src / test / run-pass / const-enum-structlike.rs
index cc9d24e16db2c71b6c44d2cefa2d5bb8216ec97b..a526e0be3da41378e95c833a075f9a35bf239e76 100644 (file)
@@ -8,16 +8,17 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+
 enum E {
-    S0 { s: ~str },
-    S1 { u: uint }
+    S0 { s: String },
+    S1 { u: usize }
 }
 
-static C: E = S1 { u: 23 };
+static C: E = E::S1 { u: 23 };
 
 pub fn main() {
     match C {
-        S0 { _ } => fail!(),
-        S1 { u } => assert!(u == 23)
+        E::S0 { .. } => panic!(),
+        E::S1 { u } => assert_eq!(u, 23)
     }
 }