blob: 738e3f2f4beb828831aa3331ec18beadbb21180b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
error[E0308]: mismatched types
--> $DIR/return-bindings-multi.rs:1:17
|
LL | fn a(i: i32) -> i32 {
| - ^^^ expected `i32`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
|
note: consider returning one of these bindings
--> $DIR/return-bindings-multi.rs:1:6
|
LL | fn a(i: i32) -> i32 {
| ^
LL |
LL | let j = 2i32;
| ^
error[E0308]: mismatched types
--> $DIR/return-bindings-multi.rs:6:25
|
LL | fn b(i: i32, j: i32) -> i32 {}
| - ^^^ expected `i32`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
|
note: consider returning one of these bindings
--> $DIR/return-bindings-multi.rs:6:6
|
LL | fn b(i: i32, j: i32) -> i32 {}
| ^ ^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.
|