Skip to content

Illegal instruction building struct that recurses inside boxed array #24732

Closed
@emosenkis

Description

@emosenkis

The following code produces an "Illegal instruction (core dumped)" when run (on linux/x86_64, both in debug and release mode):

fn main() {
    let x = T {f: Box::new([None])};
}

struct T {
    f: Box<[Option<T>; 1]>
}

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