Rustc incorrectly points to where
-clause bound when calling static method on invalid type
#82038
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-trait-system
Area: Trait system
C-bug
Category: This is a bug.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
D-verbose
Diagnostics: Too much output caused by a single piece of incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code:
produces the following output:
The root cause of the error is the fact that
bool
does not implementFoo
, so theSelf: Clone
bound isn't relevant. If thewhere
clause is split over multiple lines, then this can obscure the actual cause of the error.The text was updated successfully, but these errors were encountered: