@@ -474,8 +474,8 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
474
474
* destination,
475
475
) ;
476
476
}
477
- TerminatorKind :: UnwindTerminate => {
478
- codegen_panic_cannot_unwind ( fx, source_info) ;
477
+ TerminatorKind :: UnwindTerminate ( reason ) => {
478
+ codegen_unwind_terminate ( fx, source_info, * reason ) ;
479
479
}
480
480
TerminatorKind :: UnwindResume => {
481
481
// FIXME implement unwinding
@@ -971,13 +971,14 @@ pub(crate) fn codegen_panic_nounwind<'tcx>(
971
971
codegen_panic_inner ( fx, rustc_hir:: LangItem :: PanicNounwind , & args, source_info. span ) ;
972
972
}
973
973
974
- pub ( crate ) fn codegen_panic_cannot_unwind < ' tcx > (
974
+ pub ( crate ) fn codegen_unwind_terminate < ' tcx > (
975
975
fx : & mut FunctionCx < ' _ , ' _ , ' tcx > ,
976
976
source_info : mir:: SourceInfo ,
977
+ reason : UnwindTerminateReason ,
977
978
) {
978
979
let args = [ ] ;
979
980
980
- codegen_panic_inner ( fx, rustc_hir :: LangItem :: PanicCannotUnwind , & args, source_info. span ) ;
981
+ codegen_panic_inner ( fx, reason . lang_item ( ) , & args, source_info. span ) ;
981
982
}
982
983
983
984
fn codegen_panic_inner < ' tcx > (
0 commit comments