Skip to content

Commit 12672e2

Browse files
committed
Add test for ICE #62375
Fixes #62375
1 parent 0beb2ba commit 12672e2

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/test/ui/issues/issue-62375.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
enum A {
2+
Value(())
3+
}
4+
5+
fn main() {
6+
let a = A::Value(());
7+
a == A::Value;
8+
//~^ ERROR binary operation `==` cannot be applied to type `A`
9+
}

src/test/ui/issues/issue-62375.stderr

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
error[E0369]: binary operation `==` cannot be applied to type `A`
2+
--> $DIR/issue-62375.rs:7:7
3+
|
4+
LL | a == A::Value;
5+
| - ^^ -------- fn(()) -> A {A::Value}
6+
| |
7+
| A
8+
|
9+
= note: an implementation of `std::cmp::PartialEq` might be missing for `A`
10+
11+
error: aborting due to previous error
12+
13+
For more information about this error, try `rustc --explain E0369`.

0 commit comments

Comments
 (0)