@@ -481,7 +481,9 @@ fn visit_expr(ir: &mut IrMaps, expr: &Expr) {
481481 ir. add_live_node_for_node ( expr. id , ExprNode ( expr. span ) ) ;
482482 visit:: walk_expr ( ir, expr) ;
483483 }
484- ExprIfLet ( ..) => fail ! ( "non-desugared ExprIfLet" ) ,
484+ ExprIfLet ( ..) => {
485+ ir. tcx . sess . span_bug ( expr. span , "non-desugared ExprIfLet" ) ;
486+ }
485487 ExprForLoop ( ref pat, _, _, _) => {
486488 pat_util:: pat_bindings ( & ir. tcx . def_map , & * * pat, |bm, p_id, sp, path1| {
487489 debug ! ( "adding local variable {} from for loop with bm {:?}" ,
@@ -1012,7 +1014,9 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
10121014 self . propagate_through_expr ( & * * cond, ln)
10131015 }
10141016
1015- ExprIfLet ( ..) => fail ! ( "non-desugared ExprIfLet" ) ,
1017+ ExprIfLet ( ..) => {
1018+ self . ir . tcx . sess . span_bug ( expr. span , "non-desugared ExprIfLet" ) ;
1019+ }
10161020
10171021 ExprWhile ( ref cond, ref blk, _) => {
10181022 self . propagate_through_loop ( expr, WhileLoop ( & * * cond) , & * * blk, succ)
@@ -1473,7 +1477,9 @@ fn check_expr(this: &mut Liveness, expr: &Expr) {
14731477 ExprPath ( ..) | ExprBox ( ..) => {
14741478 visit:: walk_expr ( this, expr) ;
14751479 }
1476- ExprIfLet ( ..) => fail ! ( "non-desugared ExprIfLet" )
1480+ ExprIfLet ( ..) => {
1481+ this. ir . tcx . sess . span_bug ( expr. span , "non-desugared ExprIfLet" ) ;
1482+ }
14771483 }
14781484}
14791485
0 commit comments