Skip to content

Unintelligible error for statics in pattern position #17933

Closed
@mahkoh

Description

@mahkoh
pub static X: uint = 1u;

fn main() {
    match 1u {
        self::X => { },
        _       => { },
    }
}
test2.rs:5:9: 5:16 error: mismatched types: expected `uint`, found an enum or structure pattern
test2.rs:5         self::X => { },
                   ^~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions