Change:
Evaluating of promoteds currently looks very confusing in the query stack: is not a const, so "const-evaluating " is just nonsense. I presume that this is easy to fix but only would know how. ;) <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Also see
Let's give a try :wink:
claim
awesome. :) Let us know if you need any help. I am not very familiar with that specific code, but can still help with more general questions, and I hope can help with the specifics. :D

Discussion:
pub promoted: Option<mir::Promoted>, } <ins> impl GlobalId<'tcx> { pub fn display(self, tcx: TyCtxt<'tcx>) -> String { let instance_name = tcx.def_path_str(self.instance.def.def_id()); if let Some(promoted) = self.promoted { format!("{}::{:?}", instance_name, promoted) } else { instance_name } } } </ins> /// Input argument for `tcx.lit_to_const`. #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, HashStable)] pub struct LitToConstInput<'tcx> {

-> ConstEvalRawResult<'tcx> { desc { |tcx| "const-evaluating `{}`", <del> tcx.def_path_str(key.value.instance.def.def_id()) </del> <ins> key.value.display(tcx) </ins> } }

-> ConstEvalResult<'tcx> { desc { |tcx| "const-evaluating + checking `{}`", <del> tcx.def_path_str(key.value.instance.def.def_id()) </del> <ins> key.value.display(tcx) </ins> } cache_on_disk_if(_, opt_result) { // Only store results without errors

LL |     const B: u8 = Self::A; |     ^^^^^^^^^^^^^^^^^^^^^^ = note: ...which again requires normalizing `<() as Tr>::A`, completing the cycle <del> note: cycle used when const-evaluating `main` </del> <ins> note: cycle used when const-evaluating `main::promoted[2]` </ins> --> $DIR/defaults-cyclic-fail.rs:14:1 | LL | fn main() {

<ins> // compile-flags: -Ztreat-err-as-bug // build-fail // failure-status: 101 // rustc-env:RUST_BACKTRACE=1 // normalize-stderr-test "nerror: internal compiler error.*nn" -> "" // normalize-stderr-test "note:.*unexpectedly panicked.*nn" -> "" // normalize-stderr-test "note: we would appreciate a bug report.*nn" -> "" // normalize-stderr-test "note: compiler flags.*nn" -> "" // normalize-stderr-test "note: rustc.*running on.*nn" -> "" // normalize-stderr-test "thread.*panicked.*n" -> "" // normalize-stderr-test "stack backtrace:n" -> "" // normalize-stderr-test "  d{1,}: .*n" -> "" // normalize-stderr-test ".*note: Some details.*n" -> "" #![allow(unconditional_panic)] fn main() { let x: &'static i32 = &(1 / 0); //~^ ERROR reaching this expression at runtime will panic or abort [const_err] println!("x={}", x); } </ins>

<ins> error: reaching this expression at runtime will panic or abort --> $DIR/const-eval-query-stack.rs:18:28 | LL |     let x: &'static i32 = &(1 / 0); |                           -^^^^^^^ |                            | |                            dividing by zero | = note: `#[deny(const_err)]` on by default query stack during panic: #0 [const_eval_raw] const-evaluating `main::promoted[1]` #1 [const_eval_validated] const-evaluating + checking `main::promoted[1]` #2 [const_eval_validated] const-evaluating + checking `main::promoted[1]` #3 [normalize_generic_arg_after_erasing_regions] normalizing `main::promoted[1]` #4 [optimized_mir] optimizing MIR for `main` #5 [collect_and_partition_mono_items] collect_and_partition_mono_items end of query stack </ins>