]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/nested-pattern.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / nested-pattern.rs
index 0bc6280393cff82e85bf474c8591207dd68a9945..14a84484f649c01d13a8091b14cc690b7547059d 100644 (file)
@@ -16,9 +16,9 @@ enum t { foo(int, uint), bar(int, Option<int>), }
 
 fn nested(o: t) {
     match o {
-        bar(_i, Some::<int>(_)) => { error!("wrong pattern matched"); fail!(); }
-        _ => { error!("succeeded"); }
+        t::bar(_i, Some::<int>(_)) => { println!("wrong pattern matched"); panic!(); }
+        _ => { println!("succeeded"); }
     }
 }
 
-pub fn main() { nested(bar(1, None::<int>)); }
+pub fn main() { nested(t::bar(1, None::<int>)); }