]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/issue-2633.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / issue-2633.rs
index e7da12861378b91267cd0edd2bd2e255504a8c36..de99141c80311381a47ca48841732d40c6e26142 100644 (file)
@@ -8,16 +8,22 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[derive(Copy)]
 struct cat {
-    meow: @fn(),
+    meow: extern "Rust" fn(),
+}
+
+fn meow() {
+    println!("meow")
 }
 
 fn cat() -> cat {
     cat {
-        meow: || error!("meow")
+        meow: meow,
     }
 }
 
+#[derive(Copy)]
 struct KittyInfo {kitty: cat}
 
 // Code compiles and runs successfully if we add a + before the first arg