]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-87429-associated-type-default.rs
Auto merge of #99612 - yanchen4791:issue-95079-fix, r=compiler-errors
[rust.git] / src / test / ui / generic-associated-types / issue-87429-associated-type-default.rs
1 // check-fail
2
3 #![feature(associated_type_defaults)]
4 #![feature(generic_associated_types)]
5
6 trait Family {
7     // Fine, i32: PartialEq<i32>
8     type Member<'a>: for<'b> PartialEq<Self::Member<'b>> = i32;
9 }
10
11 struct Foo;
12 trait Family2 {
13     // Not fine, not Foo: PartialEq<Foo>
14     type Member<'a>: for<'b> PartialEq<Self::Member<'b>> = Foo;
15     //~^ ERROR can't compare
16 }
17
18 fn main() {}