diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2019-11-20 19:24:44 -0500 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2019-11-20 20:19:23 -0500 |
| commit | bc7b17c4779f09778e014b6c4c8198ac1f9a8ffa (patch) | |
| tree | bfe7eb8b69665d0e780da1557ba08d19fe4f9c67 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | f1b882b55805c342e46ee4ca3beeef1d1fa2044b (diff) | |
| download | rust-bc7b17c4779f09778e014b6c4c8198ac1f9a8ffa.tar.gz rust-bc7b17c4779f09778e014b6c4c8198ac1f9a8ffa.zip | |
Fix cycle when debug-printing opaque types
Fixes #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.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
