Skip to content

Infinite recursion for enum variant defined in terms of itself #23302

Closed
@huonw

Description

@huonw
enum X { A = X::A as isize }

fn main() {}
thread 'rustc' has overflowed its stack
Illegal instruction (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions