2022-04-01 12:13:25 -05:00
|
|
|
// compile-flags:-Zverbose
|
2017-12-10 09:23:45 -06: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 10:10:22 -06:00
|
|
|
//~^ ERROR captures lifetime that does not appear in bounds
|
2017-12-10 09:23:45 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|