Error message for T <binop> U
worsens if T
has exactly one implementation of the relevant trait
#77304
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-trait-system
Area: Trait system
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This code
Emits the error message
However, if the type
S
has any implementation ofPartialEq<T>
for a single typeT
that is not()
, the error message becomes less helpful:If there are two or more impls of
PartialEq
, the error message becomes helpful again:This also applies to other binary operation traits like
PartialOrd
andAdd
.The text was updated successfully, but these errors were encountered: