Skip to content

Constants in pattern ranges don't parse #7222

Closed
@brson

Description

@brson
fn main() {
    static FOO: float = 10.0;

    match 0.0 {
        0.0 .. FOO => (),
        _ => ()
    }
}
/home/brian/dev/rust/src/test/run-pass/test.rs:5:15: 5:18 error: unexpected token: `FOO`
/home/brian/dev/rust/src/test/run-pass/test.rs:5         0.0 .. FOO => (),

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an ASTE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions