E0002: unexpected indentation
Generated from rellum-diagnostics/src/db.rs.
Explanation
A line may indent only when the previous syntactic form opens an indented block, such as match arms, request bodies, enum variant blocks, or expression blocks after = or =>. Extra indentation elsewhere would create a block the parser is not expecting.
Common causes
- indenting a top-level binding without a preceding block opener
- adding spaces before a continuation line that should stay at the current indentation
- placing a block body after syntax that does not accept one
Canonical fixes
- align the line with the surrounding binding
Before:
value = 1
main! = print!(value)
After:
value = 1
main! = print!(value)
- add the missing block opener if an indented body was intended
Code example
value = 1
main! = print!(value)