fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
340 B19 linesraw
1// edition:2021
2// run-rustfix
3
4#![allow(unused)]
5
6use std::future::Future;
7
8async 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
15async fn func<T>(fut: impl Future<Output = T>) -> T {
16    fut.await
17}
18
19fn main() {}