]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/generic-fn-infer.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / generic-fn-infer.rs
index b1f5a06ee3497b43ab5a0b508b845bc24de32bd0..2f88a54e3f5e0535bf1e51df0cd9fec312b4b60b 100644 (file)
@@ -1,9 +1,18 @@
+// 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.
+
 
 
 
-// -*- rust -*-
 
 // Issue #45: infer type parameters in function applications
-fn id<@T>(x: T) -> T { ret x; }
+fn id<T>(x: T) -> T { return x; }
 
-fn main() { let x: int = 42; let y: int = id(x); assert (x == y); }
+pub fn main() { let x: int = 42; let y: int = id(x); assert!((x == y)); }