mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-21 11:23:03 +00:00
parent
9656ceac60
commit
d28e0c0c0a
@ -452,6 +452,10 @@ 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 {
|
||||
alt an_alt.guard {
|
||||
some(e) { find_pre_post_expr(fcx, e); }
|
||||
_ {}
|
||||
}
|
||||
find_pre_post_block(fcx, an_alt.body);
|
||||
ret block_pp(fcx.ccx, an_alt.body);
|
||||
}
|
||||
|
@ -530,6 +530,12 @@ fn find_pre_post_state_expr(fcx: fn_ctxt, pres: prestate, e: @expr) -> bool {
|
||||
if vec::len(alts) > 0u {
|
||||
a_post = false_postcond(num_constrs);
|
||||
for an_alt: arm in alts {
|
||||
alt an_alt.guard {
|
||||
some(e) {
|
||||
changed |= find_pre_post_state_expr(fcx, e_post, e);
|
||||
}
|
||||
_ {}
|
||||
}
|
||||
changed |=
|
||||
find_pre_post_state_block(fcx, e_post, an_alt.body);
|
||||
intersect(a_post, block_poststate(fcx.ccx, an_alt.body));
|
||||
|
Loading…
Reference in New Issue
Block a user