about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2013-02-22 22:15:11 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-02-27 14:33:19 -0800
commitdbbdca31b45997604d4bf99662cb32939c838149 (patch)
treedf7558d09a00f2b658a957e47c56fe49a87500db
parent33e7a1f087b3b8047891b91fa95c5626042e7f6e (diff)
downloadrust-dbbdca31b45997604d4bf99662cb32939c838149.tar.gz
rust-dbbdca31b45997604d4bf99662cb32939c838149.zip
testsuite: Update and un-xfail #3601 test
-rw-r--r--src/test/compile-fail/issue-3601.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/compile-fail/issue-3601.rs b/src/test/compile-fail/issue-3601.rs
index 3dd070b44a0..e0adf9eca51 100644
--- a/src/test/compile-fail/issue-3601.rs
+++ b/src/test/compile-fail/issue-3601.rs
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-test
 struct HTMLImageData {
     image: Option<~str>
 }
@@ -25,18 +24,19 @@ enum NodeKind {
     Element(ElementData)
 }
 
-enum NodeData = {
+struct NodeData {
     kind: ~NodeKind
-};
+}
 
 fn main() {
     let mut id = HTMLImageData { image: None };
     let ed = ElementData { kind: ~HTMLImageElement(id) };
-    let n = NodeData({kind : ~Element(ed)});
+    let n = NodeData {kind : ~Element(ed)};
+    // n.b. span could be better
     match n.kind {
-        ~Element(ed) => match ed.kind {
-            ~HTMLImageElement(d) if d.image.is_some() => { true }
+        ~Element(ed) => match ed.kind { //~ ERROR non-exhaustive patterns
+            ~HTMLImageElement(ref d) if d.image.is_some() => { true }
         },
-        _ => fail!(~"WAT") //~ ERROR wat
+        _ => fail!(~"WAT") //~ ERROR unreachable pattern
     };
 }