1 error[E0277]: the `?` operator can only be used in an async block that returns `Result` or `Option` (or another type that implements `Try`)
2 --> $DIR/try-on-option-in-async.rs:8:9
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 `Try` is not implemented for `{integer}`
14 = note: required by `from_error`
16 error[E0277]: the `?` operator can only be used in an async closure that returns `Result` or `Option` (or another type that implements `Try`)
17 --> $DIR/try-on-option-in-async.rs:17:9
19 LL | let async_closure = async || {
20 | __________________________________-
21 LL | | let x: Option<u32> = None;
23 | | ^^ cannot use the `?` operator in an async closure that returns `u32`
26 | |_____- this function should return `Result` or `Option` to accept `?`
28 = help: the trait `Try` is not implemented for `u32`
29 = note: required by `from_error`
31 error[E0277]: the `?` operator can only be used in an async function that returns `Result` or `Option` (or another type that implements `Try`)
32 --> $DIR/try-on-option-in-async.rs:26:5
34 LL | async fn an_async_function() -> u32 {
35 | _____________________________________-
36 LL | | let x: Option<u32> = None;
38 | | ^^ cannot use the `?` operator in an async function that returns `u32`
41 | |_- this function should return `Result` or `Option` to accept `?`
43 = help: the trait `Try` is not implemented for `u32`
44 = note: required by `from_error`
46 error: aborting due to 3 previous errors
48 For more information about this error, try `rustc --explain E0277`.