diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index bbe06c0935231..672e01ddbd021 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -371,6 +371,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write { && self.tcx().sess.opts.trimmed_def_paths && !with_no_trimmed_paths() && !with_crate_prefix() + && !with_no_queries() && let Some(symbol) = self.tcx().trimmed_def_paths(()).get(&def_id) { write!(self, "{}", Ident::with_dummy_span(*symbol))?;