Skip to content

Commit 635a656

Browse files
committed
---
yaml --- r: 3921 b: refs/heads/master c: 0957525 h: refs/heads/master i: 3919: 52ebcbc v: v3
1 parent c0f8288 commit 635a656

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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: 1a6419bd731adeaa8779b490716449f9a369e2fa
2+
refs/heads/master: 0957525cc67abd582cecf82486c9955268b3a9ec

trunk/src/comp/middle/trans.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4655,11 +4655,11 @@ fn load_environment(&@block_ctxt cx, &@fn_ctxt fcx,
46554655
C_int(abi::closure_elt_bindings)]);
46564656
auto llremotebindingsptr =
46574657
copy_args_bcx.build.Load(llremotebindingsptrptr);
4658+
auto base = 0u;
46584659
auto i = 0u;
46594660
auto end = std::ivec::len(upvars);
46604661
if (!option::is_none(cx.fcx.lliterbody)) {
4661-
end += 1u;
4662-
i += 1u;
4662+
base += 1u;
46634663
auto lliterbodyptr =
46644664
copy_args_bcx.build.GEP(llremotebindingsptr,
46654665
~[C_int(0), C_int(0)]);
@@ -4670,7 +4670,7 @@ fn load_environment(&@block_ctxt cx, &@fn_ctxt fcx,
46704670
auto upvar_id = upvars.(i);
46714671
auto llupvarptrptr =
46724672
copy_args_bcx.build.GEP(llremotebindingsptr,
4673-
~[C_int(0), C_int(i as int)]);
4673+
~[C_int(0), C_int(base+i as int)]);
46744674
auto llupvarptr = copy_args_bcx.build.Load(llupvarptrptr);
46754675
fcx.llupvars.insert(upvar_id, llupvarptr);
46764676
i += 1u;

0 commit comments

Comments
 (0)