Skip to content

Commit 4284863

Browse files
committed
---
yaml --- r: 3930 b: refs/heads/master c: e9a6fc9 h: refs/heads/master v: v3
1 parent 3babf2a commit 4284863

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: a3301f74f90e75415fc93a8eb55fd5aa92c6905a
2+
refs/heads/master: e9a6fc94d5cd17fee6ec9b7cd232cb5475f84dac

trunk/src/comp/middle/trans.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4086,6 +4086,10 @@ fn collect_upvars(&@block_ctxt cx, &fn (&walk::ast_visitor) walker,
40864086
resolve::def_map def_map,
40874087
session::session sess);
40884088

4089+
fn walk_fn(env e, &ast::_fn f, &ast::ty_param[] tps, &span sp,
4090+
&ast::fn_ident i, ast::node_id nid) {
4091+
for (ast::arg a in f.decl.inputs) { e.decls.insert(a.id, ()); }
4092+
}
40894093
fn walk_expr(env e, &@ast::expr expr) {
40904094
alt (expr.node) {
40914095
case (ast::expr_path(?path)) {
@@ -4123,7 +4127,8 @@ fn collect_upvars(&@block_ctxt cx, &fn (&walk::ast_visitor) walker,
41234127
def_map=cx.fcx.lcx.ccx.tcx.def_map,
41244128
sess=cx.fcx.lcx.ccx.tcx.sess);
41254129
auto visitor =
4126-
@rec(visit_local_pre=bind walk_local(e, _),
4130+
@rec(visit_fn_pre=bind walk_fn(e, _, _, _, _, _),
4131+
visit_local_pre=bind walk_local(e, _),
41274132
visit_expr_pre=bind walk_expr(e, _),
41284133
visit_pat_pre=bind walk_pat(e, _)
41294134
with walk::default_visitor());

0 commit comments

Comments
 (0)