| error[E0308]: mismatched types |
| --> $DIR/param-env-shadowing-false-positive.rs:14:5 |
| | |
| LL | fn foo<T: Trait>(x: T::Assoc) -> u32 { |
| | --- expected `u32` because of return type |
| LL | x |
| | ^ expected `u32`, found associated type |
| | |
| = note: expected type `u32` |
| found associated type `<T as Trait>::Assoc` |
| help: consider constraining the associated type `<T as Trait>::Assoc` to `u32` |
| | |
| LL | fn foo<T: Trait<Assoc = u32>>(x: T::Assoc) -> u32 { |
| | +++++++++++++ |
| |
| error: aborting due to 1 previous error |
| |
| For more information about this error, try `rustc --explain E0308`. |