E0078
ErrorSafe fix
mut on _
ErrorSafe fixlet _ = e evaluates e and drops the value at once. It binds no name, so it cannot be mut.
Why
mut lets a name be assigned again, and _ is no name: nothing can ever assign to it. The fix deletes the mut, and nothing else.
Broken
fn make() -> i64 {
1
}
fn main() {
let mut _ = make()
}
What sisu says
error[E0078]: `_` binds nothing, so it cannot be `mut` --> E0078.sisu:6:13 | 6 | let mut _ = make() | ^ | help: use `let _` | 6 - let mut _ = make() 6 + let _ = make() | sisu: 1 error sisu: for more on a code, run `sisu explain <code>`: E0078
Fixed
fn make() -> i64 {
1
}
fn main() {
let _ = make()
}
Sisu