]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr
Auto merge of #106742 - compiler-errors:new-solver-make-it-not-ice, r=lcnr
[rust.git] / tests / ui / impl-trait / in-trait / opaque-in-impl-is-opaque.stderr
1 error[E0308]: mismatched types
2   --> $DIR/opaque-in-impl-is-opaque.rs:17:19
3    |
4 LL |     fn bar(&self) -> impl Display {
5    |                      ------------ the found opaque type
6 ...
7 LL |     let x: &str = ().bar();
8    |            ----   ^^^^^^^^ expected `&str`, found opaque type
9    |            |
10    |            expected due to this
11    |
12    = note: expected reference `&str`
13             found opaque type `impl std::fmt::Display`
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0308`.