summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-enum-variants/self-in-enum-definition.rs
blob: 8dadd77fc16d5d4bbd1bf7dcbd91306749132d62 (plain)
1
2
3
4
5
6
7
8
#[repr(u8)]
enum Alpha {
    V1 = 41,
    V2 = Self::V1 as u8 + 1,    // OK; See #50072.
    V3 = Self::V1 {} as u8 + 2, //~ ERROR cycle detected when simplifying constant
}

fn main() {}