Skip to content

Commit 35b8f87

Browse files
committed
Fix use of wrong block context in return-from-loop code
Closes #2142
1 parent 321ccc1 commit 35b8f87

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/cargo/pgp.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@ fn verify(root: str, data: str, sig: str, keyfp: str) -> bool {
8989
let p = gpg(["--homedir", path, "--with-fingerprint", "--verify", sig,
9090
data]);
9191
let res = "Primary key fingerprint: " + keyfp;
92-
let mut rslt = false;
9392
for str::split_char(p.err, '\n').each {|line|
94-
if line == res { rslt = true; }
93+
if line == res { ret true; }
9594
}
96-
ret rslt;
95+
ret false;
9796
}

src/rustc/middle/trans/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2757,8 +2757,8 @@ fn trans_call_inner(in_cx: block, fn_expr_ty: ty::t, ret_ty: ty::t,
27572757
let mut bcx = f_res.bcx;
27582758
let ccx = cx.ccx();
27592759
let ret_flag = if ret_in_loop {
2760-
let flag = alloca(in_cx, T_bool());
2761-
Store(cx, C_bool(false), flag);
2760+
let flag = alloca(bcx, T_bool());
2761+
Store(bcx, C_bool(false), flag);
27622762
some(flag)
27632763
} else { none };
27642764

0 commit comments

Comments
 (0)