error[E0384]: cannot assign twice to immutable variable `x` --> src\main.rs:3:5 | 2 | let x = 0; | - first assignment to `x` 3 | x += 1; | ^^^^^^ cannot assign twice to immutable variable | help: consider making this binding mutable | 2 | let mut x = 0; | +++ For more information about this error, try `rustc --explain E0384`. warning: `simple` (bin "simple") generated 2 warnings error: could not compile `simple` (bin "simple") due to 1 previous error; 2 warnings emitted
Be adamant: I will beat this computer.
fn take_bus_π() -> Result<(), TransportError> { /* .. */ } // One variant per kind of errorenum TransportError { TrafficJam, Speeding { km_h: usize },}
error[E0384] --> src\main.rs:3:5 | 3 | x += 1; | ^^^^^^ warning: `simple` (bin "simple") generated 2 warnings error: could not compile `simple` (bin "simple") due to 1 previous error; 2 warnings emitted
Don't just tell people, "things are bad", and leave them in the dark, Shine a light, and take them to a better place.