E0033
Name that is not in scope
ErrorUnsafe fixA name in an expression must be a binding in scope: a let, a parameter, or a binding made by for, if let or while let. A binding is in scope from its declaration to the end of its block.
The name of a type is no binding: f64 or a class's name read as a value is E0105. So is the name of a function read as a value.
When a binding in scope has a similar name, the error offers it as an unsafe fix. The unsafe fix may be wrong: the name could be a binding that was never declared.
Why
Sisu does not resolve a misspelled name on its own. A misspelled name, or one used after its block has ended, would otherwise read some other value or none.
Broken
fn main() {
let total = 3
print(totl)
}
What sisu says
error[E0033]: cannot find binding `totl` --> E0033.sisu:3:11 | 3 | print(totl) | ^^^^ | help: a binding with a similar name exists: `total` | 3 | print(total) | + sisu: 1 error sisu: for more on a code, run `sisu explain <code>`: E0033
Fixed
fn main() {
let total = 3
print(total)
}
Sisu