@@ -6157,11 +6157,11 @@ fn trans_expr_out(&@block_ctxt cx, &@ast::expr e, out_method output)
6157
6157
}
6158
6158
6159
6159
case ( ast:: expr_assert( ?a, _) ) {
6160
- ret trans_check_expr( cx, a) ;
6160
+ ret trans_check_expr( cx, a, "Assertion" ) ;
6161
6161
}
6162
6162
6163
6163
case ( ast:: expr_check( ?a, _) ) {
6164
- ret trans_check_expr( cx, a) ;
6164
+ ret trans_check_expr( cx, a, "Predicate" ) ;
6165
6165
}
6166
6166
6167
6167
case ( ast:: expr_break( ?a) ) {
@@ -6367,10 +6367,10 @@ fn trans_log(int lvl, &@block_ctxt cx, &@ast::expr e) -> result {
6367
6367
ret res( after_cx, C_nil ( ) ) ;
6368
6368
}
6369
6369
6370
- fn trans_check_expr( & @block_ctxt cx, & @ast:: expr e) -> result {
6370
+ fn trans_check_expr( & @block_ctxt cx, & @ast:: expr e, & str s ) -> result {
6371
6371
auto cond_res = trans_expr( cx, e) ;
6372
6372
6373
- auto expr_str = expr_to_str( e) ;
6373
+ auto expr_str = s + " " + expr_to_str( e) + " failed" ;
6374
6374
auto fail_cx = new_sub_block_ctxt( cx, "fail" ) ;
6375
6375
auto fail_res = trans_fail( fail_cx, some[ common:: span] ( e. span) , expr_str) ;
6376
6376
0 commit comments