about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2013-07-29 13:44:53 -0700
committerMichael Sullivan <sully@msully.net>2013-08-05 10:33:55 -0700
commitbcf62e790151eda088896cd5aeda4b727ec1572a (patch)
tree44aefdeb80187af612bc192be8f4e2b0f3e15d2c /src/libsyntax
parentd89ff7eef969aee6b493bc846b64d68358fafbcd (diff)
downloadrust-bcf62e790151eda088896cd5aeda4b727ec1572a.tar.gz
rust-bcf62e790151eda088896cd5aeda4b727ec1572a.zip
Make node_id_to_str print more useful info in some cases. Closes #2410.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast_map.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs
index 5cba22a8e23..6b4da9671a9 100644
--- a/src/libsyntax/ast_map.rs
+++ b/src/libsyntax/ast_map.rs
@@ -466,11 +466,11 @@ pub fn node_id_to_str(map: map, id: NodeId, itr: @ident_interner) -> ~str {
       Some(&node_local(ident)) => {
         fmt!("local (id=%?, name=%s)", id, itr.get(ident.name))
       }
-      Some(&node_block(_)) => {
-        fmt!("block")
+      Some(&node_block(ref block)) => {
+        fmt!("block %s (id=%?)", pprust::block_to_str(block, itr), id)
       }
-      Some(&node_struct_ctor(*)) => {
-        fmt!("struct_ctor")
+      Some(&node_struct_ctor(_, _, path)) => {
+        fmt!("struct_ctor %s (id=%?)", path_to_str(*path, itr), id)
       }
     }
 }