Skip to content

ICE on record update with "fail" as base record #4113

Closed
@rntz

Description

@rntz
struct Foo { x: int }

fn main() {
  let _ = Foo { x: 0, ..fail };
}

Compiling this results in an ICE:

bugs/record-update-ice.rs:4:24: 4:28 error: internal compiler error: bad base expr type in record
bugs/record-update-ice.rs:4   let _ = Foo { x: 0, ..fail };
                                                    ^~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.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