| error[E0271]: type mismatch resolving `<T as Foo>::Assoc == i32` |
| --> $DIR/param-candidate-shadows-project.rs:27:19 |
| | |
| LL | require_bar::<T>(); |
| | ^ expected `i32`, found associated type |
| | |
| = note: expected type `i32` |
| found associated type `<T as Foo>::Assoc` |
| note: required for `T` to implement `Bar` |
| --> $DIR/param-candidate-shadows-project.rs:13:9 |
| | |
| LL | impl<T> Bar for T where T: Foo<Assoc = i32> {} |
| | ^^^ ^ ----------- unsatisfied trait bound introduced here |
| note: required by a bound in `require_bar` |
| --> $DIR/param-candidate-shadows-project.rs:15:19 |
| | |
| LL | fn require_bar<T: Bar>() {} |
| | ^^^ required by this bound in `require_bar` |
| help: consider constraining the associated type `<T as Foo>::Assoc` to `i32` |
| | |
| LL | fn foo<T: Foo<Assoc = i32>>() { |
| | +++++++++++++ |
| |
| error: aborting due to 1 previous error |
| |
| For more information about this error, try `rustc --explain E0271`. |