-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Improve generic arg–param mismatch errors #68437
Comments
This is follow up work for #68434. |
Please give more context on this. I am not sure the error message of which test should be improved. |
Ok. I see. Thanks for the explanation. |
That said, if @varkor is too busy to work on this, you could talk to them on Discord or Zulip to see what their plans were, and maybe turn this into a mentored issue. |
The idea is essentially this. We currently emit errors telling the user that the generic arguments they provide are in the wrong order: https://github.com/rust-lang/rust/pull/68434/files#diff-5df0144261224cec2047029de05fa827R107 I don't have the bandwidth to work on this at the moment, or any time soon, so if anyone is interested in tackling it, I'll be happy to mentor the issue. |
@varkor would you mind if I take this up? |
@rakshith-ravi: you're very welcome to! Let me know if you need any guidance in tackling this issue! |
@rustbot claim |
Improve compiler error message for wrong generic parameter order - Added optional "help" parameter that shows a help message on the compiler error if required. - Added a simple ordered parameter as a sample help. @varkor will make more changes as required. Let me know if I'm heading in the right direction. Fixes rust-lang#68437 r? @varkor
Improve compiler error message for wrong generic parameter order - Added optional "help" parameter that shows a help message on the compiler error if required. - Added a simple ordered parameter as a sample help. @varkor will make more changes as required. Let me know if I'm heading in the right direction. Fixes rust-lang#68437 r? @varkor
Improve compiler error message for wrong generic parameter order - Added optional "help" parameter that shows a help message on the compiler error if required. - Added a simple ordered parameter as a sample help. @varkor will make more changes as required. Let me know if I'm heading in the right direction. Fixes rust-lang#68437 r? @varkor
The current diagnostics are a little ad hoc and rely on counting the number of mismatches (e.g. they will only produce an error for the first mismatch). It would be nice to produce diagnostics like:
cc @eddyb
This issue has been assigned to @rakshith-ravi via this comment.
The text was updated successfully, but these errors were encountered: