blob: 9ee07c2f1e1cc953a0535c22080bcfbe37faeb8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// check-fail
#![feature(associated_type_defaults)]
#![feature(generic_associated_types)]
trait Family {
// Fine, i32: PartialEq<i32>
type Member<'a>: for<'b> PartialEq<Self::Member<'b>> = i32;
}
struct Foo;
trait Family2 {
// Not fine, not Foo: PartialEq<Foo>
type Member<'a>: for<'b> PartialEq<Self::Member<'b>> = Foo;
//~^ ERROR can't compare
}
fn main() {}
|