]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/in-trait/default-body-type-err.stderr
Rollup merge of #103338 - l4l:enum-unreachable-pub, r=nagisa
[rust.git] / src / test / ui / impl-trait / in-trait / default-body-type-err.stderr
1 error[E0271]: type mismatch resolving `<&i32 as Deref>::Target == String`
2   --> $DIR/default-body-type-err.rs:7:22
3    |
4 LL |     fn lol(&self) -> impl Deref<Target = String> {
5    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `String`
6 LL |
7 LL |         &1i32
8    |         ----- return type was inferred to be `&i32` here
9
10 error: aborting due to previous error
11
12 For more information about this error, try `rustc --explain E0271`.