diff options
Diffstat (limited to 'tests/ui/associated-item/associated-item-two-bounds.rs')
-rw-r--r-- | tests/ui/associated-item/associated-item-two-bounds.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/associated-item/associated-item-two-bounds.rs b/tests/ui/associated-item/associated-item-two-bounds.rs new file mode 100644 index 000000000..25b0d5a56 --- /dev/null +++ b/tests/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() {} |