-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
show suggestion to replace generic bounds with associated types in more cases #95379
show suggestion to replace generic bounds with associated types in more cases #95379
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon. Please see the contribution instructions for more information. |
☔ The latest upstream changes (presumably #95506) made this pull request unmergeable. Please resolve the merge conflicts. |
5707fd4
to
37ca2f7
Compare
☔ The latest upstream changes (presumably #95667) made this pull request unmergeable. Please resolve the merge conflicts. |
37ca2f7
to
decc04d
Compare
Sorry for the delay reviewing here! LGTM! @bors r+ |
📌 Commit decc04d has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e2661ba): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Moves the hint to replace generic parameters with associated type bounds from the "not all associated type bounds are specified"(
E0191
) to "to many generic type parameters provided"(E0107
).Since
E0191
is only emitted in places where all associated types must be specified (when creatingdyn
types), the suggesting is currently not shown for other generic type uses (such as in generic type bounds). With this change the suggesting is always emitted when the number of excess generic parameters matches the number of unbound associated types.Main motivation for the change was a lack of useful suggesting when doing