blob: e5e3e24ae947466ddc100aa05057d662d0787036 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
//@ run-pass
struct Recbox<T> {x: Box<T>}
fn reclift<T>(t: T) -> Recbox<T> { return Recbox { x: Box::new(t) }; }
pub fn main() {
let foo: isize = 17;
let rbfoo: Recbox<isize> = reclift::<isize>(foo);
assert_eq!(*rbfoo.x, foo);
}
|