1
Fork 0

Modify primary span label for E0308

The previous output was unintuitive to users.
This commit is contained in:
Esteban Küber 2023-01-02 18:00:33 -08:00
parent 006ca9b14d
commit 62ba3e70a1
383 changed files with 889 additions and 926 deletions

View file

@ -4,7 +4,7 @@ error[E0053]: method `bar` has an incompatible return type for trait
LL | fn bar() -> i32 { 0 }
| ^^^
| |
| expected struct `Wrapper`, found `i32`
| expected `Wrapper<_>`, found `i32`
| return type in trait
|
= note: expected struct `Wrapper<_>`

View file

@ -4,7 +4,7 @@ error[E0308]: mismatched types
LL | 42
| ^^- help: try using a conversion method: `.to_string()`
| |
| expected struct `String`, found integer
| expected `String`, found integer
error: aborting due to previous error

View file

@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<&i32 as Deref>::Target == String`
--> $DIR/default-body-type-err.rs:7:22
|
LL | fn lol(&self) -> impl Deref<Target = String> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `String`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `String`
LL |
LL | &1i32
| ----- return type was inferred to be `&i32` here