-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling poll
on an impl Future
should suggest pinning.
#108572
Comments
Pointing the user at My guess, however, is that this is a general problem one might encounter with generalized |
Is there a preferred message for @rustbot claim |
…ture, r=petrochenkov feat: impl better help for `.poll()` not found on `impl Future` Partially address rust-lang#108572 I'd like to also address suggestions for generalized `Self` parameters as well. That'll be a separate PR.
…ture, r=petrochenkov feat: impl better help for `.poll()` not found on `impl Future` Partially address rust-lang#108572 I'd like to also address suggestions for generalized `Self` parameters as well. That'll be a separate PR.
Note that the main part of this issue has been fixed. However, suggestions for generalized self parameters has not been fixed. I'll work on this at some point but if someone else wants to take it up then do so. |
@pnkfelix Turns out that suggestions for this have always been around; this issue can be closed. |
Code
Current output
Desired output
Rationale and extra context
Someone who is just playing around based on the types and the rustdoc output is very likely to be confused by the current compiler error, because its easy to overlook the effect of
Pin<&mut Self>
as the receiver type forpoll
onstd::future::Future
. We can do a better job of gradually guiding the developer to the right solution, or at least push them towards the right solution space.Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: