about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/print/pretty.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-06-04 19:50:24 +0200
committerGitHub <noreply@github.com>2025-06-04 19:50:24 +0200
commit23ba088502f4e05a9f79cfa6e6a3494161d5f09e (patch)
tree1b3afdafaed098aa309fe99423005f127c80805f /compiler/rustc_middle/src/ty/print/pretty.rs
parent8cd8ed30508979985ab026de960feca874b49cef (diff)
parentcbb3a847d25f998486248a8db201773eeb489d60 (diff)
downloadrust-23ba088502f4e05a9f79cfa6e6a3494161d5f09e.tar.gz
rust-23ba088502f4e05a9f79cfa6e6a3494161d5f09e.zip
Rollup merge of #141985 - compiler-errors:cycle-in-dep-graph-print, r=oli-obk
Ensure query keys are printed with reduced queries

Using `-Z query-dep-graph` and debug assertions leads to an ICE that was originally discovered in rust-lang/rust#141700:

> This isn't an incremental bug per se, but instead a bug that has to do with debug printing query keys when debug assertions and `-Z query-dep-graph` is enabled. We end up printing a const (b/c we're using generic const args here) whose debug printing for -Z query-dep-graph requires invoking the same query cyclically 😃
>
> I've pushed a commit which should fix this.

This isn't related to the standard library changes, but instead b/c it seems to be the first usage of `feature(adt_const_params)` in the standard library that ends up being triggered in incremental tests.

r? oli-obk
Diffstat (limited to 'compiler/rustc_middle/src/ty/print/pretty.rs')
-rw-r--r--compiler/rustc_middle/src/ty/print/pretty.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs
index 877bea095f9..673a89a8134 100644
--- a/compiler/rustc_middle/src/ty/print/pretty.rs
+++ b/compiler/rustc_middle/src/ty/print/pretty.rs
@@ -1886,7 +1886,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
     ) -> Result<(), PrintError> {
         define_scoped_cx!(self);
 
-        if self.should_print_verbose() {
+        if with_reduced_queries() || self.should_print_verbose() {
             p!(write("ValTree({:?}: ", cv.valtree), print(cv.ty), ")");
             return Ok(());
         }