@@ -1069,26 +1069,29 @@ impl Handler {
10691069 }
10701070
10711071 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+ } )
10731076 }
10741077
10751078 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+ } )
10801083 }
10811084 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+ } )
10861089 }
10871090 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+ } )
10921095 }
10931096
10941097 pub fn print_error_count ( & self , registry : & Registry ) {
@@ -1333,6 +1336,7 @@ impl HandlerInner {
13331336 . push ( DelayedDiagnostic :: with_backtrace ( diagnostic. clone ( ) , backtrace) ) ;
13341337
13351338 if !self . flags . report_delayed_bugs {
1339+ #[ allow( deprecated) ]
13361340 return Some ( ErrorGuaranteed :: unchecked_claim_error_was_emitted ( ) ) ;
13371341 }
13381342 }
@@ -1411,7 +1415,10 @@ impl HandlerInner {
14111415 self . bump_err_count ( ) ;
14121416 }
14131417
1414- guaranteed = Some ( ErrorGuaranteed :: unchecked_claim_error_was_emitted ( ) ) ;
1418+ #[ allow( deprecated) ]
1419+ {
1420+ guaranteed = Some ( ErrorGuaranteed :: unchecked_claim_error_was_emitted ( ) ) ;
1421+ }
14151422 } else {
14161423 self . bump_warn_count ( ) ;
14171424 }
0 commit comments