Skip to content

Panic: "internal compiler error: ident only path should have been covered already" #22426

Closed
@cjsut

Description

@cjsut

This error is triggered by providing type parameters to a generic type in a match pattern.

e.g.

#![crate_type = "staticlib"]

pub struct Foo<T>(T, T);

impl<T> Foo<T> {
    fn foo(&self) {
        match *self {
            Foo<T>(x, y) => println!("Goodbye, World!")
        }
    }
}

Playpen here.

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