rust/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs
2024-02-27 17:43:40 +00:00

12 lines
221 B
Rust

//@ edition:2021
// https://github.com/rust-lang/rust/issues/117547
trait T {}
trait MyTrait {
async fn foo() -> &'static impl T;
//~^ ERROR the associated type `impl T` may not live long enough
}
fn main() {}