2023-12-14 13:11:28 +01:00
|
|
|
//@ compile-flags: -Znext-solver
|
2023-03-27 21:48:43 +00:00
|
|
|
|
|
|
|
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>();
|
2025-04-09 17:25:46 +00:00
|
|
|
//~^ ERROR the trait bound `<T as Foo2>::Assoc2: Bar` is not satisfied
|
2023-03-27 21:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|