about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDániel Buga <bugadani@gmail.com>2021-01-16 16:41:53 +0100
committerDániel Buga <bugadani@gmail.com>2021-01-16 17:08:33 +0100
commitbdc7ff79969550e7d1bf6a2ccddce3a83903316e (patch)
tree1aa08e2919b6d1dce062b9a091e40af95d9e291c
parent410a546fc593272738edf53fdca020f89595752b (diff)
downloadrust-bdc7ff79969550e7d1bf6a2ccddce3a83903316e.tar.gz
rust-bdc7ff79969550e7d1bf6a2ccddce3a83903316e.zip
Add test for #34792
-rw-r--r--src/test/ui/associated-item/associated-item-two-bounds.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/associated-item/associated-item-two-bounds.rs b/src/test/ui/associated-item/associated-item-two-bounds.rs
new file mode 100644
index 00000000000..25b0d5a56bf
--- /dev/null
+++ b/src/test/ui/associated-item/associated-item-two-bounds.rs
@@ -0,0 +1,16 @@
+// This test is a regression test for #34792
+
+// check-pass
+
+pub struct A;
+pub struct B;
+
+pub trait Foo {
+    type T: PartialEq<A> + PartialEq<B>;
+}
+
+pub fn generic<F: Foo>(t: F::T, a: A, b: B) -> bool {
+    t == a && t == b
+}
+
+pub fn main() {}