]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-close-object-into-object-2.rs
Auto merge of #60093 - GuillaumeGomez:fix-attrs-pos, r=Manishearth
[rust.git] / src / test / ui / regions / regions-close-object-into-object-2.rs
1 #![feature(box_syntax)]
2
3 trait A<T> { }
4 struct B<'a, T:'a>(&'a (A<T>+'a));
5
6 trait X { }
7 impl<'a, T> X for B<'a, T> {}
8
9 fn g<'a, T: 'static>(v: Box<A<T>+'a>) -> Box<X+'static> {
10     box B(&*v) as Box<X> //~ ERROR cannot infer
11 }
12
13 fn main() { }