about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-10-10 22:45:02 +0000
committerMichael Goulet <michael@errs.io>2022-10-13 02:31:43 +0000
commit61f097308b90f79300d7a577ea9d9cfb494458fe (patch)
treed946ae106b63edfffdbbb165e4379b91ea20f221
parent0938e1680daf66ca6aad428aedf9a920a0dab5ad (diff)
downloadrust-61f097308b90f79300d7a577ea9d9cfb494458fe.tar.gz
rust-61f097308b90f79300d7a577ea9d9cfb494458fe.zip
Print RPITIT verbosely if -Zverbose
-rw-r--r--compiler/rustc_middle/src/ty/print/pretty.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs
index c0607a102a9..66354196b4e 100644
--- a/compiler/rustc_middle/src/ty/print/pretty.rs
+++ b/compiler/rustc_middle/src/ty/print/pretty.rs
@@ -637,7 +637,9 @@ pub trait PrettyPrinter<'tcx>:
                 p!(print_def_path(def_id, &[]));
             }
             ty::Projection(ref data) => {
-                if self.tcx().def_kind(data.item_def_id) == DefKind::ImplTraitPlaceholder {
+                if !(self.tcx().sess.verbose() || NO_QUERIES.with(|q| q.get()))
+                    && self.tcx().def_kind(data.item_def_id) == DefKind::ImplTraitPlaceholder
+                {
                     return self.pretty_print_opaque_impl_type(data.item_def_id, data.substs);
                 } else {
                     p!(print(data))