cycle error building rustc with debug logging #61577
The last step should rebuild librustc using a compiler with debugging enabled. I imagine there is a faster way to do this, but these are the simplest instructions I could think of.
Is this known/expected? I have no idea what the error means, but it makes debugging more difficult.
Currently on master (7cdaffd).
The text was updated successfully, but these errors were encountered:
I ran into a similar issue when using
I tracked down the cycle error I saw to the pretty-printing code for opaque types. When not printing in 'verbose mode', it attempts to call
As a hacky workaround, I changed
…matthewjasper Fix cycle when debug-printing opaque types Fixes rust-lang#61577 When printing an opaque type in non-verbose mode, we use the `tcx.predicates_of` query to retrieve the opaque type's bounds for pretty-printing. However, the pervasiveness of logging within librustc means that we may already be executing `tcx.predicates_of` for the opaque type we're trying to print, leading to a cycle error. This commit adds a new 'no queries' thread-local flag to the pretty printer. This flag is enabled during the computation of `predicates_of` for opaque types, and causes us to print the opaque type in 'verbose' mode (which does not require computing any additinal queries). This should only affect debug logging for highly nested log messages, not any user-visible output.