A (, [ or { is still open at the end of the file (or of an interpolation). The error
points at the bracket that was never closed.
Wrong#
fn main() {
print(1)Fixed#
fn main() {
print(1)
}Common causes#
- A missing
}at the end of a function or block. - A missing
)after a multi-line argument list. - An edit that deleted a closing bracket along with other code.