@@ -380,7 +380,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
380
380
rustc_hir:: LangItem :: PanicBoundsCheck ,
381
381
& [ index, len, location] ,
382
382
* unwind,
383
- Some ( source_info. span ) ,
383
+ source_info. span ,
384
384
) ;
385
385
}
386
386
AssertKind :: MisalignedPointerDereference { ref required, ref found } => {
@@ -393,7 +393,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
393
393
rustc_hir:: LangItem :: PanicMisalignedPointerDereference ,
394
394
& [ required, found, location] ,
395
395
* unwind,
396
- Some ( source_info. span ) ,
396
+ source_info. span ,
397
397
) ;
398
398
}
399
399
AssertKind :: NullPointerDereference => {
@@ -404,7 +404,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
404
404
rustc_hir:: LangItem :: PanicNullPointerDereference ,
405
405
& [ location] ,
406
406
* unwind,
407
- Some ( source_info. span ) ,
407
+ source_info. span ,
408
408
)
409
409
}
410
410
_ => {
@@ -415,7 +415,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
415
415
msg. panic_function ( ) ,
416
416
& [ location] ,
417
417
* unwind,
418
- Some ( source_info. span ) ,
418
+ source_info. span ,
419
419
) ;
420
420
}
421
421
}
@@ -531,7 +531,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
531
531
) ;
532
532
}
533
533
TerminatorKind :: UnwindTerminate ( reason) => {
534
- codegen_unwind_terminate ( fx, Some ( source_info. span ) , * reason) ;
534
+ codegen_unwind_terminate ( fx, source_info. span , * reason) ;
535
535
}
536
536
TerminatorKind :: UnwindResume => {
537
537
// FIXME implement unwinding
@@ -1074,7 +1074,7 @@ pub(crate) fn codegen_operand<'tcx>(
1074
1074
pub ( crate ) fn codegen_panic_nounwind < ' tcx > (
1075
1075
fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ,
1076
1076
msg_str : & str ,
1077
- span : Option < Span > ,
1077
+ span : Span ,
1078
1078
) {
1079
1079
let msg_ptr = fx. anonymous_str ( msg_str) ;
1080
1080
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>(
1091
1091
1092
1092
pub ( crate ) fn codegen_unwind_terminate < ' tcx > (
1093
1093
fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ,
1094
- span : Option < Span > ,
1094
+ span : Span ,
1095
1095
reason : UnwindTerminateReason ,
1096
1096
) {
1097
1097
codegen_panic_inner ( fx, reason. lang_item ( ) , & [ ] , UnwindAction :: Unreachable , span) ;
@@ -1102,7 +1102,7 @@ fn codegen_panic_inner<'tcx>(
1102
1102
lang_item : rustc_hir:: LangItem ,
1103
1103
args : & [ Value ] ,
1104
1104
_unwind : UnwindAction ,
1105
- span : Option < Span > ,
1105
+ span : Span ,
1106
1106
) {
1107
1107
fx. bcx . set_cold_block ( fx. bcx . current_block ( ) . unwrap ( ) ) ;
1108
1108
0 commit comments