Add optional message to fail.

This commit is contained in:
Josh Matthews 2011-06-08 03:58:52 -04:00
parent b5c73605ea
commit 2235fb73ef
10 changed files with 41 additions and 13 deletions

View file

@ -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! */

View file

@ -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,