Rollup merge of #55104 - estebank:addtest, r=alexcrichton

Add test for #34229

Fix #34229.
This commit is contained in:
kennytm 2018-10-18 10:47:29 +08:00
commit 2571c1c783
No known key found for this signature in database
GPG Key ID: FEF6C8051D0E013C
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`.