about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-03-31 11:43:37 -0400
committerGitHub <noreply@github.com>2017-03-31 11:43:37 -0400
commitc650ed8ee7704732664befde0f6e4d471eb626db (patch)
tree66edd4989d0650db2a2e80c350890b6aa9d4ae22
parent4af41b4789849159559744ab6f204644909613dc (diff)
parentea281962149cd188edf384cb120852369b669c50 (diff)
downloadrust-c650ed8ee7704732664befde0f6e4d471eb626db.tar.gz
rust-c650ed8ee7704732664befde0f6e4d471eb626db.zip
Rollup merge of #40928 - GAJaloyan:patch-2, r=eddyb
adding debug in consume_body function

When in debug_assertions=true mode, the function consume_body lacks some debug output, which makes it harder to follow the control flow. This commit adds this needed debug.
-rw-r--r--src/librustc/middle/expr_use_visitor.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc/middle/expr_use_visitor.rs b/src/librustc/middle/expr_use_visitor.rs
index c7cf4a35a4b..a10f52e2d4c 100644
--- a/src/librustc/middle/expr_use_visitor.rs
+++ b/src/librustc/middle/expr_use_visitor.rs
@@ -288,6 +288,8 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
     }
 
     pub fn consume_body(&mut self, body: &hir::Body) {
+        debug!("consume_body(body={:?})", body);
+
         for arg in &body.arguments {
             let arg_ty = return_if_err!(self.mc.infcx.node_ty(arg.pat.id));