E0004 — Unknown identifier
A name was referenced that isn’t bound in the current scope.
What triggers it
Resilient is strict about scope: every identifier read has to
resolve to a let, a function parameter, a top-level fn /
struct / type declaration, or a builtin. Typos and out-of-
scope references land here.
Minimal example
fn main() {
let x = 1;
return y;
}
Output:
scratch.rs:3:12: error[E0004]: unknown identifier `y`
return y;
^
Fix
Declare the name or fix the typo. If you meant a builtin, check
the spelling — builtin names are case-sensitive (println, not
Println).
fn main() {
let y = 1;
return y;
}
Source
Emitted from the typechecker (resilient/src/typechecker.rs),
the interpreter (resilient/src/main.rs), and the VM compiler
(resilient/src/compiler.rs).