]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/struct-pattern-matching.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / struct-pattern-matching.rs
index 3d8c2b7f56a0d8c24d5dadb41e9b8c6ad304f232..6033554d0cbeeef5001f5db809d911ea039a0738 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -16,6 +16,10 @@ struct Foo {
 pub fn main() {
     let a = Foo { x: 1, y: 2 };
     match a {
-        Foo { x: x, y: y } => printfln!("yes, %d, %d", x, y)
+        Foo { x: x, y: y } => println!("yes, {}, {}", x, y)
+    }
+
+    match a {
+        Foo { .. } => ()
     }
 }