Make node_id_to_str print more useful info in some cases. Closes #2410.
This commit is contained in:
parent
d89ff7eef9
commit
bcf62e7901
1 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue