]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/fn-lval.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / fn-lval.rs
index 4223e02268129b6143ed2fe419c32e03ada12e41..f21dbc6f987d21818962c88cce30d9680f37ed00 100644 (file)
@@ -1,9 +1,18 @@
-// xfail-boot
-// -*- rust -*-
+// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
 
-fn foo((fn(int) -> int) f) {}
-fn id(int x) -> int { ret x; }
 
-fn main() {
-  foo(id);
-}
+
+
+fn foo(_f: fn(int) -> int) { }
+
+fn id(x: int) -> int { return x; }
+
+pub fn main() { foo(id); }