rust/tests/ui/suggestions/return-bindings-multi.stderr
2023-01-11 09:32:08 +00:00

35 lines
951 B
Plaintext

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`.