Description
(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. I managed to resolve the issue, here's the diff that fixed it - 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.