]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/nll/ty-outlives/projection-where-clause-env-wrong-lifetime.rs
1 // Test that if we need to prove that `<T as MyTrait<'a>>::Output:
2 // 'a`, but we only know that `<T as MyTrait<'b>>::Output: 'a`, that
9 fn foo1
<'a
, 'b
, T
>() -> &'
a ()
11 for<'x
> T
: MyTrait
<'x
>,
12 <T
as MyTrait
<'b
>>::Output
: 'a
,
14 bar
::<<T
as MyTrait
<'a
>>::Output
>()
15 //~^ ERROR the associated type `<T as MyTrait<'a>>::Output` may not live long enough
18 fn bar
<'a
, T
>() -> &'
a ()