-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Misleading suggestion for missing trait bounds #40375
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Current output:
|
Triage: no change. |
Current output, very little change:
|
Current output:
|
Another case from #36513:
|
2 tasks
Current output:
The suggestion is incorrect. It should instead tell the user to replace |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
This is a simplified version of https://users.rust-lang.org/t/solved-iterator-filter-and-zip-in-place/9809/4
The error is:
The
note:
chose to report missing&Iter: Iterator
, which is true, but it's not best thing it could have noted. I guess it's looking at&Iter
because of some auto-ref in the method call. But if you force it to useIter
directly with UFCS, likeFoo::foo(v.iter())
, the note is more useful.So we do have an
Iterator
, just the wrongItem
.The text was updated successfully, but these errors were encountered: