1 error[E0277]: the `?` operator can only be used in an async block that returns `Result` or `Option` (or another type that implements `FromResidual`)
2 --> $DIR/try-on-option-in-async.rs:8:10
5 LL | | let x: Option<u32> = None;
7 | | ^ cannot use the `?` operator in an async block that returns `{integer}`
10 | |_____- this function should return `Result` or `Option` to accept `?`
12 = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `{integer}`
14 error[E0277]: the `?` operator can only be used in an async closure that returns `Result` or `Option` (or another type that implements `FromResidual`)
15 --> $DIR/try-on-option-in-async.rs:17:10
17 LL | let async_closure = async || {
18 | __________________________________-
19 LL | | let x: Option<u32> = None;
21 | | ^ cannot use the `?` operator in an async closure that returns `u32`
24 | |_____- this function should return `Result` or `Option` to accept `?`
26 = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `u32`
28 error[E0277]: the `?` operator can only be used in an async function that returns `Result` or `Option` (or another type that implements `FromResidual`)
29 --> $DIR/try-on-option-in-async.rs:26:6
31 LL | async fn an_async_function() -> u32 {
32 | _____________________________________-
33 LL | | let x: Option<u32> = None;
35 | | ^ cannot use the `?` operator in an async function that returns `u32`
38 | |_- this function should return `Result` or `Option` to accept `?`
40 = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `u32`
42 error: aborting due to 3 previous errors
44 For more information about this error, try `rustc --explain E0277`.