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` LL | let _: Foo = x; // Test that we did not apply the deref step | ----------- ^ expected `Foo`, found `Foo` | | | expected due to this | = note: expected struct `Foo` found struct `Foo` error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`.