-
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
Better Error Messages for Partially Implemented Traits #22337
Comments
Documentation clearly states there’s only |
I stated, for a beginner. So someone that just scans that it exists, at all. The main point is to just improve the error message to state which specific type |
Related: #20941 |
This is essentially fixed:
|
... which is just #21793 |
New error, but seems still fixed:
|
Yeah. Fixed. |
Specifically, for types that have a trait implemented, but require the types they use to have the trait implemented as well. For instance,
Result
. Consider the following example:Produces the following error message:
This error message is confusing to someone beginning Rust, because according to the documentation,
Result
does implementDebug
. In this case a clearer error message would be something like:Perhaps the error message could be tweaked, but in this case it should clearly point to
Y
as being the problem. Of course, ifX
andY
don't implementcore::fmt::Debug
the error message should reflect that was well.The text was updated successfully, but these errors were encountered: