E0003 — Unclosed delimiter

A (, [, or { was opened but the parser reached EOF before finding its matching close.


What triggers it

Every opening delimiter must have a matching close at the same nesting level. When one doesn’t, the parser reports E0003 pointing at the unclosed opener.

Minimal example

fn main() {
    let xs = [1, 2, 3;
}

Output:

scratch.rs:2:14: error[E0003]: unclosed `[`
   let xs = [1, 2, 3;
            ^

Fix

Close every delimiter you open. Editors with bracket-pair highlighting make this easy to spot.

fn main() {
    let xs = [1, 2, 3];
}

Source

Emitted from the parser’s delimiter-balance check in resilient/src/main.rs.