rust/src/test/run-pass/generic-bind.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

18 lines
383 B
Rust

fn id<T: copy>(t: T) -> T { ret t; }
fn main() {
let t = {_0: 1, _1: 2, _2: 3, _3: 4, _4: 5, _5: 6, _6: 7};
assert (t._5 == 6);
let f1 =
bind id::<{_0: int,
_1: int,
_2: int,
_3: int,
_4: int,
_5: int,
_6: int}>(_);
assert (f1(t)._5 == 6);
}