]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/regions/regions-close-object-into-object-4.rs
3 struct B
<'a
, T
:'a
>(&'
a (dyn A
<T
> + 'a
));
6 impl<'a
, T
> X
for B
<'a
, T
> {}
8 fn i
<'a
, T
, U
>(v
: Box
<dyn A
<U
>+'a
>) -> Box
<dyn X
+ '
static> {
9 Box
::new(B(&*v
)) as Box
<dyn X
>
10 //~^ ERROR the parameter type `U` may not live long enough [E0310]
11 //~| ERROR the parameter type `U` may not live long enough [E0310]
12 //~| ERROR the parameter type `U` may not live long enough [E0310]
13 //~| ERROR lifetime may not live long enough
14 //~| ERROR cannot return value referencing local data `*v` [E0515]
15 //~| ERROR the parameter type `U` may not live long enough [E0310]