E0013
Error
var instead of let mut
ErrorSisu has no var. A variable that can change is declared with let mut, and a field that can change is marked mut.
Why
mut marks everything that can change (ADR 0011), so there is one keyword for it, in bindings and in fields.
Broken
fn main() {
var count = 0
count += 1
print(count)
}
What sisu says
error[E0013]: there is no `var` in Sisu --> E0013.sisu:2:5 | 2 | var count = 0 | ^^^ | = help: Sisu declares a variable with `let mut` sisu: 1 error sisu: for more on a code, run `sisu explain <code>`: E0013
Fixed
fn main() {
let mut count = 0
count += 1
print(count)
}
Sisu