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
6 LL | | let x: Option<u32> = None;
8 | | ^ cannot use the `?` operator in an async block that returns `{integer}`
11 | |_____- this function should return `Result` or `Option` to accept `?`
13 = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `{integer}`
15 error[E0277]: the `?` operator can only be used in an async closure that returns `Result` or `Option` (or another type that implements `FromResidual`)
16 --> $DIR/try-on-option-in-async.rs:17:10
18 LL | let async_closure = async || {
19 | __________________________________-
20 LL | | let x: Option<u32> = None;
22 | | ^ cannot use the `?` operator in an async closure that returns `u32`
25 | |_____- this function should return `Result` or `Option` to accept `?`
27 = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `u32`
29 error[E0277]: the `?` operator can only be used in an async function that returns `Result` or `Option` (or another type that implements `FromResidual`)
30 --> $DIR/try-on-option-in-async.rs:26:6
32 LL | async fn an_async_function() -> u32 {
33 | _____________________________________-
34 LL | | let x: Option<u32> = None;
36 | | ^ cannot use the `?` operator in an async function that returns `u32`
39 | |_- this function should return `Result` or `Option` to accept `?`
41 = help: the trait `FromResidual<Option<Infallible>>` is not implemented for `u32`
43 error: aborting due to 3 previous errors
45 For more information about this error, try `rustc --explain E0277`.