summaryrefslogtreecommitdiffstats
path: root/tests/ui/generics/generic-exterior-unique.rs
blob: 10d87f9f43d0dbffc4e4418e97b828d2dce14f9a (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);
}