Deeply normalize obligations in BestObligation
This commit is contained in:
parent
62d5fb85ac
commit
decd7ecd1e
11 changed files with 172 additions and 60 deletions
|
@ -13,7 +13,7 @@ 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 the trait bound `<T as Foo1>::Assoc1: Bar` is not satisfied
|
||||
//~^ ERROR the trait bound `<T as Foo2>::Assoc2: Bar` is not satisfied
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error[E0277]: the trait bound `<T as Foo1>::Assoc1: Bar` is not satisfied
|
||||
error[E0277]: the trait bound `<T as Foo2>::Assoc2: Bar` is not satisfied
|
||||
--> $DIR/recursive-self-normalization-2.rs:15:17
|
||||
|
|
||||
LL | needs_bar::<T::Assoc1>();
|
||||
| ^^^^^^^^^ the trait `Bar` is not implemented for `<T as Foo1>::Assoc1`
|
||||
| ^^^^^^^^^ the trait `Bar` is not implemented for `<T as Foo2>::Assoc2`
|
||||
|
|
||||
note: required by a bound in `needs_bar`
|
||||
--> $DIR/recursive-self-normalization-2.rs:12:17
|
||||
|
@ -11,7 +11,7 @@ LL | fn needs_bar<S: Bar>() {}
|
|||
| ^^^ required by this bound in `needs_bar`
|
||||
help: consider further restricting the associated type
|
||||
|
|
||||
LL | fn test<T: Foo1<Assoc1 = <T as Foo2>::Assoc2> + Foo2<Assoc2 = <T as Foo1>::Assoc1>>() where <T as Foo1>::Assoc1: Bar {
|
||||
LL | fn test<T: Foo1<Assoc1 = <T as Foo2>::Assoc2> + Foo2<Assoc2 = <T as Foo1>::Assoc1>>() where <T as Foo2>::Assoc2: Bar {
|
||||
| ++++++++++++++++++++++++++++++
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue