diff options
Diffstat (limited to 'tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs')
-rw-r--r-- | tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs new file mode 100644 index 000000000..a0d619c45 --- /dev/null +++ b/tests/ui/proc-macro/issue-104884-trait-impl-sugg-err.rs @@ -0,0 +1,20 @@ +// aux-build:issue-104884.rs + +use std::collections::BinaryHeap; + +#[macro_use] +extern crate issue_104884; + +#[derive(PartialEq, Eq, PartialOrd, Ord)] +struct PriorityQueueEntry<T> { + value: T, +} + +#[derive(PartialOrd, AddImpl)] +//~^ ERROR can't compare `PriorityQueue<T>` with `PriorityQueue<T>` +//~| ERROR the trait bound `PriorityQueue<T>: Eq` is not satisfied +//~| ERROR can't compare `T` with `T` + +struct PriorityQueue<T>(BinaryHeap<PriorityQueueEntry<T>>); + +fn main() {} |