diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/impl-trait/in-trait/async-and-ret-ref.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs b/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs new file mode 100644 index 000000000..af6ffe833 --- /dev/null +++ b/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs @@ -0,0 +1,11 @@ +// edition:2021 +// https://github.com/rust-lang/rust/issues/117547 + +trait T {} + +trait MyTrait { + async fn foo() -> &'static impl T; + //~^ ERROR the associated type `<Self as MyTrait>::{opaque#0}` may not live long enough +} + +fn main() {} |