1 error[E0308]: mismatched types
2 --> $DIR/opaque-in-impl-is-opaque.rs:17:19
4 LL | fn bar(&self) -> impl Display {
5 | ------------ the found opaque type
7 LL | let x: &str = ().bar();
8 | ---- ^^^^^^^^ expected `&str`, found opaque type
10 | expected due to this
12 = note: expected reference `&str`
13 found opaque type `impl std::fmt::Display`
15 error: aborting due to previous error
17 For more information about this error, try `rustc --explain E0308`.