Skip to content

mut is accepted before constants in patterns #34047

@petrochenkov

Description

@petrochenkov

This compiles on stable/beta/nightly and C is resolved as a constant and not a new binding.

const C: u8 = 0;

fn main() {
    match 1u8 {
        mut C => {}
        _ => {}
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions