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