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
{{ message }}
Repository navigation
rustc doesn't suggest missing .await before a ? #71811
error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
--> src/main.rs:4:5
|
4 | fallible() /* mising .await */ ?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `?` operator cannot be applied to type `impl core::future::future::Future`
|
= help: the trait `std::ops::Try` is not implemented for `impl core::future::future::Future`
= note: required by `std::ops::Try::into_result`
I think it should notice that the program is trying to apply ? to a future, and suggest awaiting it.
(If there is an existing issue for this, it is not labeled A-async-await and A-suggestion-diagnostics.)
Activity
jimblandy commentedon May 2, 2020
Related: #61076
Rollup merge of rust-lang#71948 - csmoe:issue-61076, r=oli-obk
Rollup merge of rust-lang#71948 - csmoe:issue-61076, r=oli-obk
Rollup merge of #71948 - csmoe:issue-61076, r=oli-obk
Rollup merge of #71948 - csmoe:issue-61076, r=oli-obk