mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 19:23:50 +00:00
457087ed29
Add a note for `?` on a `impl Future<Output = Result<..>>` in sync function
It's confusing to `?` a future of a result in a sync function. We have a suggestion to `.await` it if we're in an async function, but not a sync function. Note that this is the case for sync functions, at least.
Let's be a bit more vague about a fix, since it's somewhat context dependent. For example, you could block on it, or you could make your function asynchronous. 🤷
|
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |