about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2019-02-01 10:33:44 -0500
committerFelix S. Klock II <pnkfelix@pnkfx.org>2019-02-15 14:27:10 +0100
commit378741b703d0501b6ff50a3cf5cde9da8319195d (patch)
tree8ae201a07df05d83d988da08dbad2e5eced21f60
parentf47ec2ad5b6887b3d400aee49e2294bd27733d18 (diff)
downloadrust-378741b703d0501b6ff50a3cf5cde9da8319195d.tar.gz
rust-378741b703d0501b6ff50a3cf5cde9da8319195d.zip
print more information for closures when `-Zverbose` is given
Ideally, we'd probably print the closure substs themselves actually.
-rw-r--r--src/librustc/util/ppaux.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs
index 1cb9f47bb31..768fd02e823 100644
--- a/src/librustc/util/ppaux.rs
+++ b/src/librustc/util/ppaux.rs
@@ -1430,6 +1430,15 @@ define_print! {
                         }
                     }
 
+                    if cx.is_verbose {
+                        write!(
+                            f,
+                            " closure_kind_ty={:?} closure_sig_ty={:?}",
+                            substs.closure_kind_ty(did, tcx),
+                            substs.closure_sig_ty(did, tcx),
+                        )?;
+                    }
+
                     write!(f, "]")
                 }),
                 Array(ty, sz) => {