Avoid pointing at multiple places on return type error

This commit is contained in:
Esteban Küber 2019-01-17 21:06:09 -08:00
parent 19255dc2e6
commit c4318502bc
4 changed files with 23 additions and 19 deletions

View file

@ -15,10 +15,7 @@ error[E0308]: mismatched types
LL | fn f() -> isize {
| ----- expected `isize` because of return type
LL | (return 1, return 2) //~ ERROR mismatched types
| ^^^^^^^^^^^^^^^^^^-^
| | |
| | expected because of this statement
| expected isize, found tuple
| ^^^^^^^^^^^^^^^^^^^^ expected isize, found tuple
|
= note: expected type `isize`
found type `(!, !)`

View file

@ -4,10 +4,7 @@ error[E0308]: mismatched types
LL | fn f() -> isize {
| ----- expected `isize` because of return type
LL | (return 1, return 2)
| ^^^^^^^^^^^^^^^^^^-^
| | |
| | expected because of this statement
| expected isize, found tuple
| ^^^^^^^^^^^^^^^^^^^^ expected isize, found tuple
|
= note: expected type `isize`
found type `(!, !)`