about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_driver/pretty.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/librustc_driver/pretty.rs b/src/librustc_driver/pretty.rs
index d930739c9f0..7fdcbfc4d29 100644
--- a/src/librustc_driver/pretty.rs
+++ b/src/librustc_driver/pretty.rs
@@ -423,7 +423,8 @@ impl<'hir> pprust_hir::PpAnn for IdentifiedAnnotation<'hir> {
             pprust_hir::NodeName(_) => Ok(()),
             pprust_hir::NodeItem(item) => {
                 s.s.space()?;
-                s.synth_comment(item.id.to_string())
+                s.synth_comment(format!("node_id: {} hir local_id: {}",
+                                        item.id, item.hir_id.local_id.0))
             }
             pprust_hir::NodeSubItem(id) => {
                 s.s.space()?;
@@ -431,16 +432,19 @@ impl<'hir> pprust_hir::PpAnn for IdentifiedAnnotation<'hir> {
             }
             pprust_hir::NodeBlock(blk) => {
                 s.s.space()?;
-                s.synth_comment(format!("block {}", blk.id))
+                s.synth_comment(format!("block node_id: {} hir local_id: {}",
+                                        blk.id, blk.hir_id.local_id.0))
             }
             pprust_hir::NodeExpr(expr) => {
                 s.s.space()?;
-                s.synth_comment(expr.id.to_string())?;
+                s.synth_comment(format!("node_id: {} hir local_id: {}",
+                                        expr.id, expr.hir_id.local_id.0))?;
                 s.pclose()
             }
             pprust_hir::NodePat(pat) => {
                 s.s.space()?;
-                s.synth_comment(format!("pat {}", pat.id))
+                s.synth_comment(format!("pat node_id: {} hir local_id: {}",
+                                        pat.id, pat.hir_id.local_id.0))
             }
         }
     }