Skip to content

ICE with method call on nonsensical pattern binding ("no param def for...") #7092

Closed
@bblum

Description

@bblum

This is as small as I could get the test case. No idea what's going on here.

enum Whatever {
}

fn foo(x: Whatever) {
    match x {
        Some(field) => field.access(),
    }
}

fn main(){}

results in:

sync.rs:6:8: 6:19 error: mismatched types: expected `Whatever` but found `std::option::Option<<V3>>` (expected enum Whatever but found enum std::option::Option)
sync.rs:6         Some(field) => field.access(),
                  ^~~~~~~~~~~
sync.rs:6:23: 6:38 error: internal compiler error: No param def for {idx: 0, def_id: {crate: 1, node: 63929}}
sync.rs:6         Some(field) => field.access(),
                                 ^~~~~~~~~~~~~~~

Filing under... resolve? I guess? and nominating for production-ready milestone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-lowLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions