Skip to content

ICE: trying to take the sizing type of A, an unsized type #17025

Closed
@wanders

Description

@wanders

Getting this ICE:
error: internal compiler error: trying to take the sizing type of A, an unsized type

when compiling this:

enum A {
    B(char),
    C([Box<A>]),
}

fn c(c:char) -> A {
    return B(c)
}

pub fn main() {
}

Heard on IRC that pinging @nick29581 may be good on this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.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