Add optional message to fail.
This commit is contained in:
parent
b5c73605ea
commit
2235fb73ef
10 changed files with 41 additions and 13 deletions
|
|
@ -459,7 +459,7 @@ fn find_pre_post_expr(&fn_ctxt fcx, @expr e) -> () {
|
|||
find_pre_post_expr(fcx, operator);
|
||||
copy_pre_post(fcx.ccx, a, operator);
|
||||
}
|
||||
case (expr_fail(?a)) {
|
||||
case (expr_fail(?a, _)) {
|
||||
set_pre_and_post(fcx.ccx, a,
|
||||
/* if execution continues after fail,
|
||||
then everything is true! */
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ fn find_pre_post_state_expr(&fn_ctxt fcx, &prestate pres, @expr e) -> bool {
|
|||
expr_poststate(fcx.ccx, operand)) || changed;
|
||||
ret changed;
|
||||
}
|
||||
case (expr_fail(?a)) {
|
||||
case (expr_fail(?a, _)) {
|
||||
changed = extend_prestate_ann(fcx.ccx, a, pres) || changed;
|
||||
/* if execution continues after fail, then everything is true! woo! */
|
||||
changed = set_poststate_ann(fcx.ccx, a,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue