]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ty-outlives/impl-trait-captures.rs
Sync core::simd up to rust-lang/portable-simd@2e081db92aa3ee0a4563bc28ce01bdad5b1b2efd
[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() {}