E0002 — Expected / missing ;
A statement needs a terminating semicolon that isn’t there, or
an unexpected ; appeared where the grammar didn’t expect one.
What triggers it
Resilient requires ; at the end of let, assignment, and
expression statements inside blocks. Omitting it — or putting
one inside a position where the grammar doesn’t consume it —
surfaces E0002.
Minimal example
fn main() {
let x = 1
let y = 2;
}
Output:
scratch.rs:3:5: error[E0002]: expected `;` after let binding
let y = 2;
^
Fix
Add the missing ; at the end of the statement that wanted one:
fn main() {
let x = 1;
let y = 2;
}
Source
Emitted from parse_let_statement and the statement-list walker
in resilient/src/main.rs.