rust/src/test/run-pass/generic-fn-infer.rs
Marijn Haverbeke 60ae1590af Switch to new param kind bound syntax
And remove support for the old syntax
2012-01-05 15:50:02 +01:00

10 lines
187 B
Rust

// -*- rust -*-
// Issue #45: infer type parameters in function applications
fn id<T: copy>(x: T) -> T { ret x; }
fn main() { let x: int = 42; let y: int = id(x); assert (x == y); }