Skip to content

Commit

Permalink
Add test for #34229
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Oct 15, 2018
1 parent 5a52983 commit 70dd9ca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/ui/issues/issue-34229.rs
@@ -0,0 +1,4 @@
#[derive(PartialEq)] struct Comparable;
#[derive(PartialEq, PartialOrd)] struct Nope(Comparable);

fn main() {}
12 changes: 12 additions & 0 deletions src/test/ui/issues/issue-34229.stderr
@@ -0,0 +1,12 @@
error[E0277]: can't compare `Comparable` with `Comparable`
--> $DIR/issue-34229.rs:2:46
|
LL | #[derive(PartialEq, PartialOrd)] struct Nope(Comparable);
| ^^^^^^^^^^ no implementation for `Comparable < Comparable` and `Comparable > Comparable`
|
= help: the trait `std::cmp::PartialOrd` is not implemented for `Comparable`
= note: required by `std::cmp::PartialOrd::partial_cmp`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.

0 comments on commit 70dd9ca

Please sign in to comment.