Skip to content

Commit

Permalink
Avoid queries in printing if requested
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Mar 3, 2024
1 parent 6db96de commit eac84d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_middle/src/ty/print/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))?;
Expand Down

0 comments on commit eac84d7

Please sign in to comment.