Skip to content

internal compiler error: ID not mapped to struct fields: variant Value in Value (id=13) #17800

Closed
@azdle

Description

@azdle

I'm following the guide and the compiler is telling me that I found a bug in the compiler. (That's so frickin' cool btw.)

I'm on 'rustc (e434aa1 2014-10-04 17:47:06 +0000)', right now, I'm recompiling with the latest head to see if it still exists. I did try to search to see if this was already reported, I didn't find anything, but I don't really know what to call it.

This is the file that I'm trying to compile:

enum OptionalMsg {
    Value(int),
    Error,
}

fn main() {
    // Enums w/ Values
    let msg = Error;

    match msg {
        Value{n} => println!("OK: {:d}", n),
        Error    => println!("ERROR"),
    }
}

I know that the problem is the Value{n} instead of Value(n) in the pattern matching, but the error message told me to report it anyway.

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