From bdc7ff79969550e7d1bf6a2ccddce3a83903316e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Sat, 16 Jan 2021 16:41:53 +0100 Subject: [PATCH] Add test for #34792 --- .../associated-item-two-bounds.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/test/ui/associated-item/associated-item-two-bounds.rs 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 0000000000000..25b0d5a56bfb3 --- /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 + PartialEq; +} + +pub fn generic(t: F::T, a: A, b: B) -> bool { + t == a && t == b +} + +pub fn main() {}