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

12 lines
163 B
Rust
Raw Normal View History

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