A closing ), ] or } doesn't match the innermost open bracket, or there is no open bracket
for it to close. The note says which bracket is still open and where.
Wrong#
fn main() {
print([1, 2)
}Fixed#
fn main() {
print([1, 2])
}Common causes#
- Brackets closed in the wrong order:
([1, 2)]. - One bracket too many after an edit.
- A missing closer earlier on, so a later one pairs with the wrong opener.