Skip to content

FP expected !, found () if (() = return) {} #22991

Description

@matthiaskrgr
fn main() {
    if (() = return) {}
}

this compiles with rustc but ra diag shows

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

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