Skip to content

Invalid Recursive Enum (2+ occurances) causes compiler out-of-memory on beta/nightly #32326

Closed
@alex-ozdemir

Description

@alex-ozdemir

For example, compiling

enum Expr {
    Plus(Expr, Expr),
    Literal(i64),
}

with rustc causes the error message fatal runtime error: out of memory

Single occurrences seem to work fine.

Metadata

Metadata

Assignees

Labels

P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions