E0283 could be better for calls to associated functions on the trait itself #81701
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-inference
Area: Type inference
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
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-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This code (playground)
currently produces this error:
When I recently stumbled across this error, it took me a little while to figure out what the problem was.
I was trying to call the trait function directly and not an implementation of the function.
I think this may be even more confusing for beginners.
I think the following error message would have helped me (and may help others) understand what the problem is and how to fix it much more quickly:
The text was updated successfully, but these errors were encountered: