]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/issue-15571.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / issue-15571.rs
index 0ef0fc83c94565ca23300abadb44e72cbf69e4a7..6b273b5786a93513c9929149b5ba62eaa8b305b3 100644 (file)
@@ -8,6 +8,9 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(unknown_features)]
+#![feature(box_syntax)]
+
 fn match_on_local() {
     let mut foo = Some(box 5i);
     match foo {
@@ -45,7 +48,7 @@ fn match_on_binding() {
 
 fn match_on_upvar() {
     let mut foo = Some(box 8i);
-    (proc() {
+    let f = move|:| {
         match foo {
             None => {},
             Some(x) => {
@@ -53,7 +56,8 @@ fn match_on_upvar() {
             }
         }
         println!("'{}'", foo.unwrap());
-    })();
+    };
+    f();
 }
 
 fn main() {