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

11 lines
171 B
Rust
Raw Normal View History

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