File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
compiler/rustc_mir_transform/src Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -1199,7 +1199,7 @@ fn insert_panic_block<'tcx>(
11991199 message : AssertMessage < ' tcx > ,
12001200) -> BasicBlock {
12011201 let assert_block = BasicBlock :: new ( body. basic_blocks . len ( ) ) ;
1202- let term = TerminatorKind :: Assert {
1202+ let kind = TerminatorKind :: Assert {
12031203 cond : Operand :: Constant ( Box :: new ( ConstOperand {
12041204 span : body. span ,
12051205 user_ty : None ,
@@ -1211,14 +1211,7 @@ fn insert_panic_block<'tcx>(
12111211 unwind : UnwindAction :: Continue ,
12121212 } ;
12131213
1214- let source_info = SourceInfo :: outermost ( body. span ) ;
1215- body. basic_blocks_mut ( ) . push ( BasicBlockData {
1216- statements : Vec :: new ( ) ,
1217- terminator : Some ( Terminator { source_info, kind : term } ) ,
1218- is_cleanup : false ,
1219- } ) ;
1220-
1221- assert_block
1214+ insert_term_block ( body, kind)
12221215}
12231216
12241217fn can_return < ' tcx > ( tcx : TyCtxt < ' tcx > , body : & Body < ' tcx > , param_env : ty:: ParamEnv < ' tcx > ) -> bool {
You can’t perform that action at this time.
0 commit comments