diff options
| author | kennytm <kennytm@gmail.com> | 2018-10-18 10:47:29 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-10-18 12:55:04 +0800 |
| commit | 2571c1c7833025fd8bd3ad01245e5ce57221aa64 (patch) | |
| tree | 1432043223139abb2538eb6141cb703e82d22bbc | |
| parent | 8988403d69f06284381f0c454641c78a8bdd0f96 (diff) | |
| parent | 70dd9ca5da56b805c9495f4e0e91e67fdb1d4a02 (diff) | |
| download | rust-2571c1c7833025fd8bd3ad01245e5ce57221aa64.tar.gz rust-2571c1c7833025fd8bd3ad01245e5ce57221aa64.zip | |
Rollup merge of #55104 - estebank:addtest, r=alexcrichton
Add test for #34229 Fix #34229.
| -rw-r--r-- | src/test/ui/issues/issue-34229.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-34229.stderr | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-34229.rs b/src/test/ui/issues/issue-34229.rs new file mode 100644 index 00000000000..bcdfcc767fb --- /dev/null +++ b/src/test/ui/issues/issue-34229.rs @@ -0,0 +1,4 @@ +#[derive(PartialEq)] struct Comparable; +#[derive(PartialEq, PartialOrd)] struct Nope(Comparable); + +fn main() {} diff --git a/src/test/ui/issues/issue-34229.stderr b/src/test/ui/issues/issue-34229.stderr new file mode 100644 index 00000000000..c57f80cd409 --- /dev/null +++ b/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`. |
