Closed
Description
UPDATE: If you are interested in fixing this bug, there are mentoring instructions in this comment below.
fn main() {
let x = plus_one(5);
println!("X = {}", x);
}
fn plus_one(x: i32) -> i32 {
x + 1;
}
|
6 | fn plus_one(x: i32) -> i32 {
| ____________________________^ starting here...
7 | | x + 1;
8 | | }
| |_^ ...ending here: expected (), found i32
|
= note: expected type `()`
found type `i32`
I think that types in "expected type ()
found type i32
" needs to be exchanged
$ rustc --version
rustc 1.18.0-nightly (452bf0852 2017-04-19)