Skip to content

Allow static variables in range expressions #6989

Closed
@jdm

Description

@jdm
static foo: int = 16;

fn main() {
    match 15 {
        3 .. foo => io::println(~"success"),
        _ => fail!()
    }
}
/tmp/rusttest.rs:5:13: 5:16 error: unexpected token: `foo`
/tmp/rusttest.rs:5         3 .. foo => io::println(~"success"),
                                ^~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions