Skip to content

ICE when reporting lifetime error involving self in default methods #8010

Closed
@msullivan

Description

@msullivan
trait Thing {
    fn foo(&mut self) { (self, self); }
}

fn main() { }

This should fail with a lifetime error, but instead fails with

error: internal compiler error: Loan path LpVar(8) maps to None, not local

The failure occurs in append_loan_path_to_str while formatting the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-lifetimesArea: Lifetimes / regionsI-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