Skip to content

resolve: bad diagnostics for unresolved enum in pattern #33043

Closed
@jseyfried

Description

@jseyfried

Reduced from an situation I encountered in the wild:

fn main() {
    match unimplemented!() {
        E::V => {}
        //^ currently is, "error: unresolved enum variant, struct or const `V`"
        //| should be "error: failed to resolve. Use of undeclared type or module `E`"
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions