Avoid pointing at multiple places on return type error
This commit is contained in:
parent
19255dc2e6
commit
c4318502bc
4 changed files with 23 additions and 19 deletions
|
|
@ -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 `(!, !)`
|
||||
|
|
|
|||
|
|
@ -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 `(!, !)`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue