]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/issue-97704.fixed
Rollup merge of #107255 - lcnr:implied-b-hr, r=oli-obk
[rust.git] / tests / ui / suggestions / issue-97704.fixed
1 // edition:2021
2 // run-rustfix
3
4 #![allow(unused)]
5
6 use std::future::Future;
7
8 async fn foo() -> Result<(), i32> {
9     func(async { Ok::<_, i32>(()) }).await?;
10     //~^ ERROR the `?` operator can only be applied to values that implement `Try`
11
12     Ok(())
13 }
14
15 async fn func<T>(fut: impl Future<Output = T>) -> T {
16     fut.await
17 }
18
19 fn main() {}