Skip to content

ICE: failed to get layout for E: the type E has an unknown layout #35988

Closed
@petrochenkov

Description

@petrochenkov

This is a regression: reproduces on beta and nightly, doesn't reproduce on stable.

enum E {
    V([Box<E>])
}

fn main() {}
error: internal compiler error: ../src/librustc_lint/types.rs:698: failed to get layout for `E`: the type `E` has an unknown layout

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

thread 'rustc' panicked at 'Box<Any>', ../src/librustc_errors/lib.rs:634
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions