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

11 lines
181 B
Rust
Raw Normal View History

2012-08-01 17:30:05 -07:00
fn id<T: copy>(t: T) -> T { return t; }
fn main() {
2011-07-27 14:19:39 +02:00
let expected = @100;
let actual = id::<@int>(expected);
log(debug, *actual);
assert (*expected == *actual);
}