Add test for ICE #62375

Fixes #62375
This commit is contained in:
Wesley Wiser 2019-07-04 10:48:47 -04:00
parent 0beb2ba16a
commit 12672e2053
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,9 @@
enum A {
Value(())
}
fn main() {
let a = A::Value(());
a == A::Value;
//~^ ERROR binary operation `==` cannot be applied to type `A`
}

View File

@ -0,0 +1,13 @@
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 `std::cmp::PartialEq` might be missing for `A`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0369`.