mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Rollup merge of #81081 - bugadani:double-partialeq, r=Mark-Simulacrum
Add test for #34792 Closes #34792
This commit is contained in:
commit
a6b2e1f046
16
src/test/ui/associated-item/associated-item-two-bounds.rs
Normal file
16
src/test/ui/associated-item/associated-item-two-bounds.rs
Normal file
@ -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() {}
|
Loading…
Reference in New Issue
Block a user