mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
7f795a5221
Only suggest `derive(PartialEq)` when both LHS and RHS types are the same, otherwise the suggestion is not useful.
22 lines
634 B
Plaintext
22 lines
634 B
Plaintext
error[E0369]: binary operation `==` cannot be applied to type `A`
|
|
--> $DIR/issue-62375.rs:7:7
|
|
|
|
|
LL | a == A::Value;
|
|
| - ^^ -------- fn(()) -> A {A::Value}
|
|
| |
|
|
| A
|
|
|
|
|
note: an implementation of `PartialEq<fn(()) -> A {A::Value}>` might be missing for `A`
|
|
--> $DIR/issue-62375.rs:1:1
|
|
|
|
|
LL | enum A {
|
|
| ^^^^^^ must implement `PartialEq<fn(()) -> A {A::Value}>`
|
|
help: use parentheses to construct this tuple variant
|
|
|
|
|
LL | a == A::Value(/* () */);
|
|
| ++++++++++
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0369`.
|