| error[E0308]: mismatched types |
| --> $DIR/broken-deref-chain.rs:41:30 |
| | |
| LL | fn trait_method() -> impl Trait { |
| | ---------- the found opaque type |
| ... |
| LL | x.trait_method(); |
| | - here the type of `x` is inferred to be `Foo<u32, impl Trait>` |
| LL | let _: Foo<i32, _> = x; // Test that we did not apply the deref step |
| | ----------- ^ expected `Foo<i32, _>`, found `Foo<u32, impl Trait>` |
| | | |
| | expected due to this |
| | |
| = note: expected struct `Foo<i32, _>` |
| found struct `Foo<u32, impl Trait>` |
| |
| error: aborting due to 1 previous error |
| |
| For more information about this error, try `rustc --explain E0308`. |