-
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
unconstrained type parameter makes no suggestions as to how to fix #107295
Comments
(btw the diagnostics is really coming on - it must be many months since I've come across something that really could do with improvement. rustc has improved so much over these past few years.) |
I think this diagnostics should explain all places where a type parameter can be constrained. I have definitely found this a little confusing before :) |
@rustbot claim |
I don't have enough buffer to fix it, for anyone who would want to pick it up,
need to take care the scenarios of different number of parameters. |
@rustbot claim |
@rustbot claim |
I am not sure if this would be a good first issue for me, but I would like to try my hand if no else is currently working on this. |
@Lol3rrr sure, if you wanna give it a try, go ahead and claim it and it's yours :) |
@rustbot claim |
Seems this has gone inactive again. I'm keen to take a look. @rustbot claim |
@rustbot claim |
Unconstrained type parameters made no suggestion and it makes difficult to know how to fix (rust-lang#107295). To make fixing easier, we output suggestions how to fix.
Unconstrained type parameters made no suggestion and it makes difficult to know how to fix (rust-lang#107295). To make fixing easier, we output suggestions how to fix.
Unconstrained type parameters made no suggestion and it makes difficult to know how to fix (rust-lang#107295). To make fixing easier, we output suggestions how to fix.
Unconstrained type parameters made no suggestion and it makes difficult to know how to fix (rust-lang#107295). To make fixing easier, we output suggestions how to fix.
Code
Current output
Desired output
Rationale and extra context
If we have an unconstrained type parameter, we get an error stating that it is unconstrained, but no suggestions on what to do about it and force the user to google.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=3ca555fca7f8220aaab497f87c26225b
Is there room to reduce the learning curve here with better diagnostics?
Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: