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

12 lines
153 B
Rust
Raw Normal View History

fn f<T>(t: T) -> T {
let t1 = t;
t1
}
fn main() {
let t = f(~100);
assert t == ~100;
let t = f(~@[100]);
assert t == ~@[100];
}