Closed eugene-babichenko closed 3 years ago
Is it an error like the following?
error[E0384]: cannot assign twice to immutable variable `a`
--> src\lib.rs:4:5
|
3 | fn test(mut a: u8) {
| -
| |
| first assignment to `a`
| help: consider making this binding mutable: `mut a`
4 | a = 1;
| ^^^^^ cannot assign twice to immutable variable
I fixed this problem in #2 , so try using version 0.1.2, which includes this fix.
Consider this example:
This will give an error saying that
a
is immutable although it is declared as mutable.