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