mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
16 lines
224 B
Rust
16 lines
224 B
Rust
// compile-flags:-Zverbose
|
|
|
|
#![allow(warnings)]
|
|
|
|
trait Foo<'a> {
|
|
}
|
|
|
|
impl<'a, T> Foo<'a> for T { }
|
|
|
|
fn foo<'a, T>(x: &T) -> impl Foo<'a> {
|
|
x
|
|
//~^ ERROR captures lifetime that does not appear in bounds
|
|
}
|
|
|
|
fn main() {}
|