Skip to content

Commit

Permalink
Rollup merge of rust-lang#62377 - wesleywiser:fix_62375, r=alexcrichton
Browse files Browse the repository at this point in the history
Add test for ICE rust-lang#62375

Fixes rust-lang#62375
  • Loading branch information
Centril authored Jul 5, 2019
2 parents e42e51e + 12672e2 commit a5ab8b2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/ui/issues/issue-62375.rs
Original file line number Diff line number Diff line change
@@ -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`
}
13 changes: 13 additions & 0 deletions src/test/ui/issues/issue-62375.stderr
Original file line number Diff line number Diff line change
@@ -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`.

0 comments on commit a5ab8b2

Please sign in to comment.