E0005
Error
[ that starts a line inside brackets
ErrorInside ( or [, a [ cannot start a line that follows an expression.
Why
Inside brackets a line break does not end the expression, so a [ at the start of the next line would silently index the line above. Sisu rejects it: add a comma if the [ starts a new element, or put it on the line of the array it indexes.
Broken
fn main() {
let grid = [[1, 2], [3, 4]]
print(grid
[0][1])
}
What sisu says
error[E0005]: `[` cannot start a line here --> E0005.sisu:4:5 | 4 | [0][1]) | ^ | = help: add a comma, or put `[` on the line of its array sisu: 1 error sisu: for more on a code, run `sisu explain <code>`: E0005
Fixed
fn main() {
let grid = [[1, 2], [3, 4]]
print(grid[0][1])
}
Sisu