mirror of https://github.com/rust-lang/rust
18 lines
348 B
Rust
18 lines
348 B
Rust
//@ check-fail
|
|
|
|
#![feature(associated_type_defaults)]
|
|
|
|
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() {}
|