rust/src/test/run-pass/generic-alias-unique.rs

11 lines
169 B
Rust
Raw Normal View History

fn id<uniq T>(t: T) -> T { ret t; }
fn main() {
let expected = ~100;
let actual = id::<~int>(expected);
log *actual;
assert (*expected == *actual);
}