Skip to content

FP expected i32, found ({unknown},), match on const, pattern #22985

Description

@matthiaskrgr
fn main() {
    const PAT: u128 = 1;

    match 0 {
        (.. PAT) => {}
        _ => {}
    }
}

this compiles with rustc but rust-analyzer diagnostics . shows errors

at crate ra, file /tmp/ra/src/main.rs: Error RustcHardError("E0308") from LineCol { line: 4, col: 8 } to LineCol { line: 4, col: 16 }: expected i32, found ({unknown},)

diagnostic scan complete

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions