@@ -1069,26 +1069,29 @@ impl Handler {
1069
1069
}
1070
1070
1071
1071
pub fn has_errors ( & self ) -> Option < ErrorGuaranteed > {
1072
- self . inner . borrow ( ) . has_errors ( ) . then ( ErrorGuaranteed :: unchecked_claim_error_was_emitted)
1072
+ self . inner . borrow ( ) . has_errors ( ) . then ( || {
1073
+ #[ allow( deprecated) ]
1074
+ ErrorGuaranteed :: unchecked_claim_error_was_emitted ( )
1075
+ } )
1073
1076
}
1074
1077
1075
1078
pub fn has_errors_or_lint_errors ( & self ) -> Option < ErrorGuaranteed > {
1076
- self . inner
1077
- . borrow ( )
1078
- . has_errors_or_lint_errors ( )
1079
- . then ( ErrorGuaranteed :: unchecked_claim_error_was_emitted )
1079
+ self . inner . borrow ( ) . has_errors_or_lint_errors ( ) . then ( || {
1080
+ # [ allow ( deprecated ) ]
1081
+ ErrorGuaranteed :: unchecked_claim_error_was_emitted ( )
1082
+ } )
1080
1083
}
1081
1084
pub fn has_errors_or_delayed_span_bugs ( & self ) -> Option < ErrorGuaranteed > {
1082
- self . inner
1083
- . borrow ( )
1084
- . has_errors_or_delayed_span_bugs ( )
1085
- . then ( ErrorGuaranteed :: unchecked_claim_error_was_emitted )
1085
+ self . inner . borrow ( ) . has_errors_or_delayed_span_bugs ( ) . then ( || {
1086
+ # [ allow ( deprecated ) ]
1087
+ ErrorGuaranteed :: unchecked_claim_error_was_emitted ( )
1088
+ } )
1086
1089
}
1087
1090
pub fn is_compilation_going_to_fail ( & self ) -> Option < ErrorGuaranteed > {
1088
- self . inner
1089
- . borrow ( )
1090
- . is_compilation_going_to_fail ( )
1091
- . then ( ErrorGuaranteed :: unchecked_claim_error_was_emitted )
1091
+ self . inner . borrow ( ) . is_compilation_going_to_fail ( ) . then ( || {
1092
+ # [ allow ( deprecated ) ]
1093
+ ErrorGuaranteed :: unchecked_claim_error_was_emitted ( )
1094
+ } )
1092
1095
}
1093
1096
1094
1097
pub fn print_error_count ( & self , registry : & Registry ) {
@@ -1333,6 +1336,7 @@ impl HandlerInner {
1333
1336
. push ( DelayedDiagnostic :: with_backtrace ( diagnostic. clone ( ) , backtrace) ) ;
1334
1337
1335
1338
if !self . flags . report_delayed_bugs {
1339
+ #[ allow( deprecated) ]
1336
1340
return Some ( ErrorGuaranteed :: unchecked_claim_error_was_emitted ( ) ) ;
1337
1341
}
1338
1342
}
@@ -1411,7 +1415,10 @@ impl HandlerInner {
1411
1415
self . bump_err_count ( ) ;
1412
1416
}
1413
1417
1414
- guaranteed = Some ( ErrorGuaranteed :: unchecked_claim_error_was_emitted ( ) ) ;
1418
+ #[ allow( deprecated) ]
1419
+ {
1420
+ guaranteed = Some ( ErrorGuaranteed :: unchecked_claim_error_was_emitted ( ) ) ;
1421
+ }
1415
1422
} else {
1416
1423
self . bump_warn_count ( ) ;
1417
1424
}
0 commit comments