diff options
| author | Michael Woerister <michaelwoerister@gmail> | 2013-08-23 18:45:02 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@gmail> | 2013-09-04 18:38:46 +0200 |
| commit | b81ea86530dfd9dff69815b099ba10be274830ea (patch) | |
| tree | 157b642e9a6d196adf91f9bc3358d514193e6c8e /src/libsyntax/ast_map.rs | |
| parent | 67555d9bd40a36d93e193fe2d178713481ad445e (diff) | |
| download | rust-b81ea86530dfd9dff69815b099ba10be274830ea.tar.gz rust-b81ea86530dfd9dff69815b099ba10be274830ea.zip | |
debuginfo: Support for variables captured in closures and closure type descriptions.
Diffstat (limited to 'src/libsyntax/ast_map.rs')
| -rw-r--r-- | src/libsyntax/ast_map.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs index e3023b919f8..518d0fb0c38 100644 --- a/src/libsyntax/ast_map.rs +++ b/src/libsyntax/ast_map.rs @@ -73,7 +73,7 @@ pub enum ast_node { node_variant(variant, @item, @path), node_expr(@Expr), node_stmt(@Stmt), - node_arg, + node_arg(@pat), node_local(Ident), node_block(Block), node_struct_ctor(@struct_def, @item, @path), @@ -171,7 +171,7 @@ impl Ctx { sp: codemap::Span, id: NodeId) { for a in decl.inputs.iter() { - self.map.insert(a.id, node_arg); + self.map.insert(a.id, node_arg(a.pat)); } visit::walk_fn(self, fk, decl, body, sp, id, ()); } @@ -487,8 +487,8 @@ pub fn node_id_to_str(map: map, id: NodeId, itr: @ident_interner) -> ~str { fmt!("stmt %s (id=%?)", pprust::stmt_to_str(stmt, itr), id) } - Some(&node_arg) => { - fmt!("arg (id=%?)", id) + Some(&node_arg(pat)) => { + fmt!("arg %s (id=%?)", pprust::pat_to_str(pat, itr), id) } Some(&node_local(ident)) => { fmt!("local (id=%?, name=%s)", id, itr.get(ident.name)) |
