]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/issue-87429-associated-type-default.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / ui / generic-associated-types / issue-87429-associated-type-default.rs
1 // check-fail
2
3 #![feature(associated_type_defaults)]
4
5 trait Family {
6     // Fine, i32: PartialEq<i32>
7     type Member<'a>: for<'b> PartialEq<Self::Member<'b>> = i32;
8 }
9
10 struct Foo;
11 trait Family2 {
12     // Not fine, not Foo: PartialEq<Foo>
13     type Member<'a>: for<'b> PartialEq<Self::Member<'b>> = Foo;
14     //~^ ERROR can't compare
15 }
16
17 fn main() {}