mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 03:38:29 +00:00
![]() 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. 🤷
|
||
---|---|---|
.. | ||
error_reporting | ||
errors | ||
solve | ||
traits | ||
errors.rs | ||
infer.rs | ||
lib.rs | ||
regions.rs | ||
solve.rs |