Rename a field (so that macros can mention it).
This commit is contained in:
parent
b803326063
commit
d2f9b15052
9 changed files with 13 additions and 13 deletions
|
|
@ -504,7 +504,7 @@ fn trans_alt(cx: &@block_ctxt, expr: &@ast::expr, arms: &[ast::arm],
|
|||
for a: ast::arm in arms {
|
||||
let body_cx = bodies.(i);
|
||||
if make_phi_bindings(body_cx, exit_map, ast::pat_id_map(a.pats.(0))) {
|
||||
let block_res = trans::trans_block(body_cx, a.block, output);
|
||||
let block_res = trans::trans_block(body_cx, a.body, output);
|
||||
arm_results += ~[block_res];
|
||||
} else { // Unreachable
|
||||
arm_results += ~[rslt(body_cx, C_nil())];
|
||||
|
|
|
|||
|
|
@ -504,8 +504,8 @@ fn find_pre_post_expr(fcx: &fn_ctxt, e: @expr) {
|
|||
expr_alt(ex, alts) {
|
||||
find_pre_post_expr(fcx, ex);
|
||||
fn do_an_alt(fcx: &fn_ctxt, an_alt: &arm) -> pre_and_post {
|
||||
find_pre_post_block(fcx, an_alt.block);
|
||||
ret block_pp(fcx.ccx, an_alt.block);
|
||||
find_pre_post_block(fcx, an_alt.body);
|
||||
ret block_pp(fcx.ccx, an_alt.body);
|
||||
}
|
||||
let alt_pps = ~[];
|
||||
for a: arm in alts { alt_pps += ~[do_an_alt(fcx, a)]; }
|
||||
|
|
|
|||
|
|
@ -555,8 +555,8 @@ fn find_pre_post_state_expr(fcx: &fn_ctxt, pres: &prestate, e: @expr) ->
|
|||
a_post = false_postcond(num_constrs);
|
||||
for an_alt: arm in alts {
|
||||
changed |=
|
||||
find_pre_post_state_block(fcx, e_post, an_alt.block);
|
||||
intersect(a_post, block_poststate(fcx.ccx, an_alt.block));
|
||||
find_pre_post_state_block(fcx, e_post, an_alt.body);
|
||||
intersect(a_post, block_poststate(fcx.ccx, an_alt.body));
|
||||
// We deliberately do *not* update changed here, because
|
||||
// we'd go into an infinite loop that way, and the change
|
||||
// gets made after the if expression.
|
||||
|
|
|
|||
|
|
@ -2033,9 +2033,9 @@ fn check_expr_with_unifier(fcx: &@fn_ctxt, expr: &@ast::expr,
|
|||
let result_ty = next_ty_var(fcx);
|
||||
let arm_non_bot = false;
|
||||
for arm: ast::arm in arms {
|
||||
if !check_block(fcx, arm.block) { arm_non_bot = true; }
|
||||
let bty = block_ty(tcx, arm.block);
|
||||
result_ty = demand::simple(fcx, arm.block.span, result_ty, bty);
|
||||
if !check_block(fcx, arm.body) { arm_non_bot = true; }
|
||||
let bty = block_ty(tcx, arm.body);
|
||||
result_ty = demand::simple(fcx, arm.body.span, result_ty, bty);
|
||||
}
|
||||
bot |= !arm_non_bot;
|
||||
if !arm_non_bot { result_ty = ty::mk_bot(tcx); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue