mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-19 20:13:47 +00:00
21 lines
424 B
Rust
21 lines
424 B
Rust
// compile-flags: -Znext-solver
|
|
|
|
trait Foo1 {
|
|
type Assoc1;
|
|
}
|
|
|
|
trait Foo2 {
|
|
type Assoc2;
|
|
}
|
|
|
|
trait Bar {}
|
|
fn needs_bar<S: Bar>() {}
|
|
|
|
fn test<T: Foo1<Assoc1 = <T as Foo2>::Assoc2> + Foo2<Assoc2 = <T as Foo1>::Assoc1>>() {
|
|
needs_bar::<T::Assoc1>();
|
|
//~^ ERROR overflow evaluating the requirement `<T as Foo1>::Assoc1: Bar`
|
|
//~| ERROR overflow evaluating the requirement `<T as Foo2>::Assoc2`
|
|
}
|
|
|
|
fn main() {}
|