summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/auxiliary/issue-2380.rs
blob: 79fd62d16332f9d69d84dc150f54c8155917eaa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#![crate_name="a"]
#![crate_type = "lib"]

pub trait i<T>
{
    fn dummy(&self, t: T) -> T { panic!() }
}

pub fn f<T>() -> Box<i<T>+'static> {
    impl<T> i<T> for () { }

    Box::new(()) as Box<i<T>+'static>
}