diff options
Diffstat (limited to 'tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs')
-rw-r--r-- | tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs b/tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs new file mode 100644 index 000000000..b43f98228 --- /dev/null +++ b/tests/ui/generic-associated-types/gat-bounds-normalize-pred.rs @@ -0,0 +1,17 @@ +// check-pass + +trait Foo { + type Assoc<T>: PartialEq<Self::Assoc<i32>>; +} + +impl Foo for () { + type Assoc<T> = Wrapper<T>; +} + +struct Wrapper<T>(T); + +impl<T> PartialEq<Wrapper<i32>> for Wrapper<T> { + fn eq(&self, _other: &Wrapper<i32>) -> bool { true } +} + +fn main() {} |