error[E0391]: cyclic dependency detected --> $DIR/issue-23302-2.rs:14:9 | LL | A = Y::B as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ cyclic reference | note: the cycle begins when const-evaluating `Y::A::{{initializer}}`... --> $DIR/issue-23302-2.rs:14:9 | LL | A = Y::B as isize, //~ ERROR E0391 | ^^^^^^^^^^^^^ note: ...which then requires computing layout of `Y`... --> $DIR/issue-23302-2.rs:14:9 | LL | A = Y::B as isize, //~ ERROR E0391 | ^^^^ = note: ...which then again requires const-evaluating `Y::A::{{initializer}}`, completing the cycle. error: aborting due to previous error For more information about this error, try `rustc --explain E0391`.