blob: 71ce456bfc1a8eed96c1e67316b2b257160a3d20 [file]
error[E0308]: mismatched types
--> $DIR/param-env-shadowing-issue-149910.rs:13:5
|
LL | fn foo<T: Trait>(x: T) -> T::Assoc {
| - -------- expected `<T as Trait>::Assoc` because of return type
| |
| found this type parameter
LL | x
| ^ expected associated type, found type parameter `T`
|
= note: expected associated type `<T as Trait>::Assoc`
found type parameter `T`
= note: the associated type `<T as Trait>::Assoc` is defined as `T` in the implementation, but the where-bound `T` shadows this definition
see issue #152409 <https://github.com/rust-lang/rust/issues/152409> for more information
help: consider further restricting this bound
|
LL | fn foo<T: Trait<Assoc = T>>(x: T) -> T::Assoc {
| +++++++++++
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.