2011-11-18 05:39:20 -06:00
|
|
|
type recbox<copy T> = {x: ~T};
|
2011-09-23 16:58:06 -05:00
|
|
|
|
2011-11-18 05:39:20 -06:00
|
|
|
fn reclift<copy T>(t: T) -> recbox<T> { ret {x: ~t}; }
|
2011-09-23 16:58:06 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let foo: int = 17;
|
|
|
|
let rbfoo: recbox<int> = reclift::<int>(foo);
|
|
|
|
assert (*rbfoo.x == foo);
|
|
|
|
}
|