Files
rust/tests/ui/async-await/issues/issue-63388-1.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
301 B
Rust
Raw Normal View History

//@ edition:2018
struct Xyz {
a: u64,
}
trait Foo {}
impl Xyz {
async fn do_sth<'a>(
&'a self, foo: &dyn Foo
) -> &dyn Foo //~ WARNING elided lifetime has a name
{
2022-05-21 15:46:25 -04:00
foo
//~^ ERROR explicit lifetime required in the type of `foo` [E0621]
}
}
fn main() {}