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

20 lines
305 B
Rust
Raw Normal View History

// edition:2018
struct Xyz {
a: u64,
}
trait Foo {}
impl Xyz {
async fn do_sth<'a>(
2020-02-06 03:33:05 -06:00
foo: &dyn Foo, bar: &'a dyn Foo
) -> &dyn Foo //~ ERROR missing lifetime specifier
{
2022-06-05 11:33:09 -05:00
//~^ ERROR explicit lifetime required in the type of `foo` [E0621]
foo
}
}
fn main() {}