rust/src/test/run-pass/generic-exterior-box.rs
Marijn Haverbeke 60ae1590af Switch to new param kind bound syntax
And remove support for the old syntax
2012-01-05 15:50:02 +01:00

12 lines
209 B
Rust

type recbox<T: copy> = {x: @T};
fn reclift<T: copy>(t: T) -> recbox<T> { ret {x: @t}; }
fn main() {
let foo: int = 17;
let rbfoo: recbox<int> = reclift::<int>(foo);
assert (*rbfoo.x == foo);
}