@@ -582,36 +582,6 @@ impl<'ctx> MirLowerCtx<'ctx> {
582582 Ok ( ( ) )
583583 } )
584584 }
585- Expr :: While { condition, body, label } => {
586- self . lower_loop ( current, place, * label, expr_id. into ( ) , |this, begin| {
587- let scope = this. push_drop_scope ( ) ;
588- let Some ( ( discr, to_switch) ) =
589- this. lower_expr_to_some_operand ( * condition, begin) ?
590- else {
591- return Ok ( ( ) ) ;
592- } ;
593- let fail_cond = this. new_basic_block ( ) ;
594- let after_cond = this. new_basic_block ( ) ;
595- this. set_terminator (
596- to_switch,
597- TerminatorKind :: SwitchInt {
598- discr,
599- targets : SwitchTargets :: static_if ( 1 , after_cond, fail_cond) ,
600- } ,
601- expr_id. into ( ) ,
602- ) ;
603- let fail_cond = this. drop_until_scope ( this. drop_scopes . len ( ) - 1 , fail_cond) ;
604- let end = this. current_loop_end ( ) ?;
605- this. set_goto ( fail_cond, end, expr_id. into ( ) ) ;
606- if let Some ( ( _, block) ) = this. lower_expr_as_place ( after_cond, * body, true ) ? {
607- let block = scope. pop_and_drop ( this, block) ;
608- this. set_goto ( block, begin, expr_id. into ( ) ) ;
609- } else {
610- scope. pop_assume_dropped ( this) ;
611- }
612- Ok ( ( ) )
613- } )
614- }
615585 Expr :: Call { callee, args, .. } => {
616586 if let Some ( ( func_id, generic_args) ) = self . infer . method_resolution ( expr_id) {
617587 let ty = chalk_ir:: TyKind :: FnDef (
0 commit comments