]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ty-outlives/impl-trait-captures.rs
Auto merge of #93765 - zhangyunhao116:heapsort, r=m-ou-se
[rust.git] / src / test / ui / nll / ty-outlives / impl-trait-captures.rs
1 // compile-flags:-Zverbose
2
3 #![allow(warnings)]
4
5 trait Foo<'a> {
6 }
7
8 impl<'a, T> Foo<'a> for T { }
9
10 fn foo<'a, T>(x: &T) -> impl Foo<'a> {
11     x
12     //~^ ERROR captures lifetime that does not appear in bounds
13 }
14
15 fn main() {}