]>
Commit | Line | Data |
---|---|---|
74b04a01 XL |
1 | $ cargo run |
2 | Compiling functions v0.1.0 (file:///projects/functions) | |
3 | error[E0308]: mismatched types | |
4 | --> src/main.rs:7:24 | |
5 | | | |
6 | 7 | fn plus_one(x: i32) -> i32 { | |
7 | | -------- ^^^ expected `i32`, found `()` | |
8 | | | | |
9 | | implicitly returns `()` as its body has no tail or `return` expression | |
10 | 8 | x + 1; | |
11 | | - help: consider removing this semicolon | |
12 | ||
13 | error: aborting due to previous error | |
14 | ||
15 | For more information about this error, try `rustc --explain E0308`. | |
fc512014 | 16 | error: could not compile `functions` |
74b04a01 XL |
17 | |
18 | To learn more, run the command again with --verbose. |