diff options
Diffstat (limited to 'tests/ui/async-await/issue-108572.rs')
-rw-r--r-- | tests/ui/async-await/issue-108572.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/ui/async-await/issue-108572.rs b/tests/ui/async-await/issue-108572.rs index efcb8b8eb..359658076 100644 --- a/tests/ui/async-await/issue-108572.rs +++ b/tests/ui/async-await/issue-108572.rs @@ -1,12 +1,15 @@ // edition: 2021 +// run-rustfix +#![allow(unused_must_use, dead_code)] use std::future::Future; fn foo() -> impl Future<Output=()> { async { } } -fn main() { +fn bar(cx: &mut std::task::Context<'_>) { let fut = foo(); - fut.poll(); + fut.poll(cx); //~^ ERROR no method named `poll` found for opaque type `impl Future<Output = ()>` in the current scope [E0599] } +fn main() {} |