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