Add test for #34229

This commit is contained in:
Esteban Küber 2018-10-15 14:17:54 -07:00
parent 5a52983d69
commit 70dd9ca5da
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,4 @@
#[derive(PartialEq)] struct Comparable;
#[derive(PartialEq, PartialOrd)] struct Nope(Comparable);
fn main() {}

View file

@ -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`.