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
suggest await for future-related type errors #61076
This will be harder to do for chained expessions future.field_or_resolved_future.execute_new_future()? that should have been future.await.field_or_resolved_future.execute_new_future().await?.
@nikomatsakis Looks like @wycats's error was the same, it's just that the output type of the future is more complicated (Pin<Box<Stream<Item = Value> + Send + 'static>>).
@DoctorN awesome! Sending @rustbot claim should assign you to the issue and feel free to start a topic in the #wg-async-foundations stream if you need a hand.
* [ ] Return places for functions
* [ ] Field access
* [ ] Method invocation
In bodies that aren't async, .await is not suggested, but maybe we should mention that we're not in an async block and that the future could have been awaited. I guess this is likely to be a common wip error during development.
@estebank could you write a case of return-place-for-functions? I'm not sure about this one, since await seems already suggested
Activity
nikomatsakis commentedon May 23, 2019
cc @rust-lang/wg-diagnostics @estebank
nikomatsakis commentedon May 23, 2019
@wycats was reporting a much worse error, but I'm quite sure what he did to encounter it:
Probably has something to do with streams?
estebank commentedon May 23, 2019
This will be harder to do for chained expessions
future.field_or_resolved_future.execute_new_future()?that should have beenfuture.await.field_or_resolved_future.execute_new_future().await?.cramertj commentedon May 23, 2019
@nikomatsakis Looks like @wycats's error was the same, it's just that the output type of the future is more complicated (
Pin<Box<Stream<Item = Value> + Send + 'static>>).cofibrant commentedon Jun 17, 2019
Hi, I'd be really interested in working on this
davidtwco commentedon Jun 17, 2019
@DoctorN awesome! Sending
@rustbot claimshould assign you to the issue and feel free to start a topic in the #wg-async-foundations stream if you need a hand.cofibrant commentedon Jun 17, 2019
@rustbot claim
Rollup merge of rust-lang#62067 - doctorn:await_diagnostic, r=matthew…
Rollup merge of rust-lang#62067 - doctorn:await_diagnostic, r=matthew…
Rollup merge of rust-lang#62067 - doctorn:await_diagnostic, r=matthew…
11 remaining items
jebrosen commentedon May 11, 2020
Here's another example where suggesting
.awaitwould be helpful (playground):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 rust-lang#71948 - csmoe:issue-61076, r=oli-obk
tmandry commentedon May 19, 2020
@csmoe Thanks for improving on this with #71948. Do you want to continue working on this, or release the assignment for now?
csmoe commentedon May 20, 2020
@tmandry I'll try to fix them all, more commits pending.
csmoe commentedon May 20, 2020
@estebank could you write a case of
return-place-for-functions? I'm not sure about this one, sinceawaitseems already suggestedestebank commentedon May 20, 2020
Indeed. I'm not sure if it is due to an improvement since august last year, or just a mistake on my part. Either way, we are in a good place today :)
tmandry commentedon Jul 14, 2020
Ping from wg-async-foundations triage. @csmoe are you still working on this?
csmoe commentedon Jul 15, 2020
@tmandry yes, in slow progress since time is tough these days.
Auto merge of rust-lang#72784 - csmoe:issue-61076, r=estebank