2022-04-01 13:13:25 -04:00
|
|
|
// compile-flags:-Zverbose
|
2017-12-10 10:23:45 -05:00
|
|
|
|
|
|
|
#![allow(warnings)]
|
|
|
|
|
|
|
|
trait Foo<'a> {
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a, T> Foo<'a> for T { }
|
|
|
|
|
|
|
|
fn foo<'a, T>(x: &T) -> impl Foo<'a> {
|
|
|
|
x
|
2022-02-14 16:10:22 +00:00
|
|
|
//~^ ERROR captures lifetime that does not appear in bounds
|
2017-12-10 10:23:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|