Skip to content

Parsing issues around inline consts in match arms #12824

Closed
@fmease

Description

@fmease

Syntax support for #![feature(inline_const)] was added in #7010 (rust-analyzer/ungrammar#17).
However, r-a fails to parse the following code whereas rustc accepts it:

fn f() {
    match () {
        () => const { &["--release"] }[..],
        //    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Syntax Error: expected FAT_ARROW
    }
}

rust-analyzer version: 0.3.1131-standalone (897a7ec 2022-07-17)

rustc version: rustc 1.64.0-nightly (f8588549c 2022-07-18)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserparser issuesS-unactionableIssue requires feedback, design decisions or is blocked on other work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions