rust/src/test/run-pass/generic-bind.rs

8 lines
97 B
Rust
Raw Normal View History

fn id[T](T t) -> T {
ret t;
}
fn main() {
auto f = bind id[int](_);
check (f(10) == 10);
}