E0001 — Generic parse error

The parser couldn’t reconcile the token stream with any valid grammar production, and no more-specific diagnostic applied.


What triggers it

A token appears where the grammar doesn’t accept it. Typical causes: a keyword used in expression position, a punctuation character dropped mid-statement, or a literal immediately followed by another literal with no operator between them.

Minimal example

let x = 1 1;

Output:

scratch.rs:1:11: error[E0001]: unexpected token
   let x = 1 1;
             ^

Fix

Introduce the missing operator, separator, or keyword. The parser points at the token that didn’t fit — walk backwards from there to find what’s missing.

let x = 1 + 1;

Source

Emitted from the parser in resilient/src/main.rs. Search for record_error calls that don’t yet attach a more specific code.