@@ -380,7 +380,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
380380 rustc_hir:: LangItem :: PanicBoundsCheck ,
381381 & [ index, len, location] ,
382382 * unwind,
383- Some ( source_info. span ) ,
383+ source_info. span ,
384384 ) ;
385385 }
386386 AssertKind :: MisalignedPointerDereference { ref required, ref found } => {
@@ -393,7 +393,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
393393 rustc_hir:: LangItem :: PanicMisalignedPointerDereference ,
394394 & [ required, found, location] ,
395395 * unwind,
396- Some ( source_info. span ) ,
396+ source_info. span ,
397397 ) ;
398398 }
399399 AssertKind :: NullPointerDereference => {
@@ -404,7 +404,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
404404 rustc_hir:: LangItem :: PanicNullPointerDereference ,
405405 & [ location] ,
406406 * unwind,
407- Some ( source_info. span ) ,
407+ source_info. span ,
408408 )
409409 }
410410 _ => {
@@ -415,7 +415,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
415415 msg. panic_function ( ) ,
416416 & [ location] ,
417417 * unwind,
418- Some ( source_info. span ) ,
418+ source_info. span ,
419419 ) ;
420420 }
421421 }
@@ -531,7 +531,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
531531 ) ;
532532 }
533533 TerminatorKind :: UnwindTerminate ( reason) => {
534- codegen_unwind_terminate ( fx, Some ( source_info. span ) , * reason) ;
534+ codegen_unwind_terminate ( fx, source_info. span , * reason) ;
535535 }
536536 TerminatorKind :: UnwindResume => {
537537 // FIXME implement unwinding
@@ -1074,7 +1074,7 @@ pub(crate) fn codegen_operand<'tcx>(
10741074pub ( crate ) fn codegen_panic_nounwind < ' tcx > (
10751075 fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ,
10761076 msg_str : & str ,
1077- span : Option < Span > ,
1077+ span : Span ,
10781078) {
10791079 let msg_ptr = fx. anonymous_str ( msg_str) ;
10801080 let msg_len = fx. bcx . ins ( ) . iconst ( fx. pointer_type , i64:: try_from ( msg_str. len ( ) ) . unwrap ( ) ) ;
@@ -1091,7 +1091,7 @@ pub(crate) fn codegen_panic_nounwind<'tcx>(
10911091
10921092pub ( crate ) fn codegen_unwind_terminate < ' tcx > (
10931093 fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ,
1094- span : Option < Span > ,
1094+ span : Span ,
10951095 reason : UnwindTerminateReason ,
10961096) {
10971097 codegen_panic_inner ( fx, reason. lang_item ( ) , & [ ] , UnwindAction :: Unreachable , span) ;
@@ -1102,7 +1102,7 @@ fn codegen_panic_inner<'tcx>(
11021102 lang_item : rustc_hir:: LangItem ,
11031103 args : & [ Value ] ,
11041104 _unwind : UnwindAction ,
1105- span : Option < Span > ,
1105+ span : Span ,
11061106) {
11071107 fx. bcx . set_cold_block ( fx. bcx . current_block ( ) . unwrap ( ) ) ;
11081108
0 commit comments