1 error[E0391]: cycle detected when simplifying constant for the type system `Alpha::V3::{constant#0}`
2 --> $DIR/self-in-enum-definition.rs:5:10
4 LL | V3 = Self::V1 {} as u8 + 2,
5 | ^^^^^^^^^^^^^^^^^^^^^
7 note: ...which requires simplifying constant for the type system `Alpha::V3::{constant#0}`...
8 --> $DIR/self-in-enum-definition.rs:5:10
10 LL | V3 = Self::V1 {} as u8 + 2,
11 | ^^^^^^^^^^^^^^^^^^^^^
12 note: ...which requires const-evaluating + checking `Alpha::V3::{constant#0}`...
13 --> $DIR/self-in-enum-definition.rs:5:10
15 LL | V3 = Self::V1 {} as u8 + 2,
16 | ^^^^^^^^^^^^^^^^^^^^^
17 note: ...which requires caching mir of `Alpha::V3::{constant#0}` for CTFE...
18 --> $DIR/self-in-enum-definition.rs:5:10
20 LL | V3 = Self::V1 {} as u8 + 2,
21 | ^^^^^^^^^^^^^^^^^^^^^
22 note: ...which requires elaborating drops for `Alpha::V3::{constant#0}`...
23 --> $DIR/self-in-enum-definition.rs:5:10
25 LL | V3 = Self::V1 {} as u8 + 2,
26 | ^^^^^^^^^^^^^^^^^^^^^
27 note: ...which requires borrow-checking `Alpha::V3::{constant#0}`...
28 --> $DIR/self-in-enum-definition.rs:5:10
30 LL | V3 = Self::V1 {} as u8 + 2,
31 | ^^^^^^^^^^^^^^^^^^^^^
32 note: ...which requires processing MIR for `Alpha::V3::{constant#0}`...
33 --> $DIR/self-in-enum-definition.rs:5:10
35 LL | V3 = Self::V1 {} as u8 + 2,
36 | ^^^^^^^^^^^^^^^^^^^^^
37 note: ...which requires const checking `Alpha::V3::{constant#0}`...
38 --> $DIR/self-in-enum-definition.rs:5:10
40 LL | V3 = Self::V1 {} as u8 + 2,
41 | ^^^^^^^^^^^^^^^^^^^^^
42 note: ...which requires preparing `Alpha::V3::{constant#0}` for borrow checking...
43 --> $DIR/self-in-enum-definition.rs:5:10
45 LL | V3 = Self::V1 {} as u8 + 2,
46 | ^^^^^^^^^^^^^^^^^^^^^
47 note: ...which requires unsafety-checking `Alpha::V3::{constant#0}`...
48 --> $DIR/self-in-enum-definition.rs:5:10
50 LL | V3 = Self::V1 {} as u8 + 2,
51 | ^^^^^^^^^^^^^^^^^^^^^
52 note: ...which requires building MIR for `Alpha::V3::{constant#0}`...
53 --> $DIR/self-in-enum-definition.rs:5:10
55 LL | V3 = Self::V1 {} as u8 + 2,
56 | ^^^^^^^^^^^^^^^^^^^^^
57 = note: ...which requires computing layout of `Alpha`...
58 = note: ...which again requires simplifying constant for the type system `Alpha::V3::{constant#0}`, completing the cycle
59 note: cycle used when collecting item types in top-level module
60 --> $DIR/self-in-enum-definition.rs:1:1
65 LL | | V2 = Self::V1 as u8 + 1, // OK; See #50072.
71 error: aborting due to previous error
73 For more information about this error, try `rustc --explain E0391`.