*(I wasn't able to find any existing discussion, issues or PRs about this, I'd not be surprised if someone had found it already, so my bad if this isn't a new problem)* Yesterday, I was about to take a look into #59494 (the test case for that will trigger this), running that test case with `RUST_LOG=rustc::traits` makes a cycle error happen instead of the expected ICE. I can get the ICE with just `RUST_LOG=rustc::traits::select` (IIRC), but not when I include other modules. The cycle error comes from the pretty printer, in particular [this line](https://github.com/rust-lang/rust/blob/master/src/librustc/ty/print/pretty.rs#L547). I managed to resolve the issue, [here's the diff that fixed it](https://gist.github.com/davidtwco/2ad19e572b568bc3464563c4a13bb208) - when the pretty printer calls `predicates_of` for existential types then it ends up calling code with debug logs that print the same type, causing a cycle. The diff above only bypasses the cycle error when `RUST_LOG=rustc::ty::subst,rustc::ty::context,rustc_typeck`, I assume it won't when you add more modules. Here's the [relevant Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/pretty.20print.20type.20debug.20log.20cycle.20error/near/163340604).