You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| | ^^ cannot use the `?` operator in an async block that returns `{integer}`
9
9
LL | | 22
10
-
LL | | }.await
10
+
LL | | }
11
11
| |_____- this function should return `Result` or `Option` to accept `?`
12
12
|
13
13
= help: the trait `std::ops::Try` is not implemented for `{integer}`
14
14
= note: required by `std::ops::Try::from_error`
15
15
16
16
error[E0277]: the `?` operator can only be used in an async closure that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
17
-
--> $DIR/try-on-option-in-async.rs:16:9
17
+
--> $DIR/try-on-option-in-async.rs:17:9
18
18
|
19
19
LL | let async_closure = async || {
20
20
| __________________________________-
@@ -29,7 +29,7 @@ LL | | };
29
29
= note: required by `std::ops::Try::from_error`
30
30
31
31
error[E0277]: the `?` operator can only be used in an async function that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
0 commit comments