Skip to content

Single segment variants are name resolved to identifiers #4116

@CohenArthur

Description

@CohenArthur
enum Foo {
    Relaxed,
    SeqCst,
    StressedOut,
}

use Foo::{Relaxed, SeqCst, StressedOut};

fn main() {
    let a = (Relaxed, Relaxed);

    match a {
        (Relaxed, Relaxed) => {}
        _ => {}
    }
}

we get an error since an identifier is bound multiple times, but this is incorrect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions