E0482: Nesting limit exceeded
| Code | Category | Stability |
|---|---|---|
E0482 | Struct and enum | Permanent |
Explanation
The source exceeds Rue's fixed syntactic nesting limit of 256 levels. The parser and syntax-to-IR lowering enforce this resource bound and emit E0482 instead of allowing deeply recursive syntax processing to overflow the compiler stack.
Likely cause
Generated or hand-written code contains more than 256 nested parentheses, blocks, types, field or method chains, operators, or else if branches. Flatten the expression, introduce intermediate bindings or helper functions, or correct a generator that produced pathological nesting.
Examples
Exceed the syntactic nesting limit
fn main() -> i32 { ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((7)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) }