]> git.proxmox.com Git - rustc.git/blame - src/doc/book/listings/ch03-common-programming-concepts/no-listing-23-statements-dont-return-values/output.txt
New upstream version 1.50.0+dfsg1
[rustc.git] / src / doc / book / listings / ch03-common-programming-concepts / no-listing-23-statements-dont-return-values / output.txt
CommitLineData
74b04a01
XL
1$ cargo run
2 Compiling functions v0.1.0 (file:///projects/functions)
3error[E0308]: mismatched types
4 --> src/main.rs:7:24
5 |
67 | fn plus_one(x: i32) -> i32 {
7 | -------- ^^^ expected `i32`, found `()`
8 | |
9 | implicitly returns `()` as its body has no tail or `return` expression
108 | x + 1;
11 | - help: consider removing this semicolon
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0308`.
fc512014 16error: could not compile `functions`
74b04a01
XL
17
18To learn more, run the command again with --verbose.