@@ -431,7 +431,7 @@ struct HandlerInner {
431431 warn_count : usize ,
432432 deduplicated_err_count : usize ,
433433 emitter : Box < DynEmitter > ,
434- delayed_span_bugs : Vec < DelayedDiagnostic > ,
434+ span_delayed_bugs : Vec < DelayedDiagnostic > ,
435435 delayed_good_path_bugs : Vec < DelayedDiagnostic > ,
436436 /// This flag indicates that an expected diagnostic was emitted and suppressed.
437437 /// This is used for the `delayed_good_path_bugs` check.
@@ -545,12 +545,12 @@ impl Drop for HandlerInner {
545545 self . emit_stashed_diagnostics ( ) ;
546546
547547 if !self . has_errors ( ) {
548- let bugs = std:: mem:: replace ( & mut self . delayed_span_bugs , Vec :: new ( ) ) ;
548+ let bugs = std:: mem:: replace ( & mut self . span_delayed_bugs , Vec :: new ( ) ) ;
549549 self . flush_delayed ( bugs, "no errors encountered even though `span_delayed_bug` issued" ) ;
550550 }
551551
552552 // FIXME(eddyb) this explains what `delayed_good_path_bugs` are!
553- // They're `delayed_span_bugs ` but for "require some diagnostic happened"
553+ // They're `span_delayed_bugs ` but for "require some diagnostic happened"
554554 // instead of "require some error happened". Sadly that isn't ideal, as
555555 // lints can be `#[allow]`'d, potentially leading to this triggering.
556556 // Also, "good path" should be replaced with a better naming.
@@ -609,7 +609,7 @@ impl Handler {
609609 deduplicated_err_count : 0 ,
610610 deduplicated_warn_count : 0 ,
611611 emitter,
612- delayed_span_bugs : Vec :: new ( ) ,
612+ span_delayed_bugs : Vec :: new ( ) ,
613613 delayed_good_path_bugs : Vec :: new ( ) ,
614614 suppressed_expected_diag : false ,
615615 taught_diagnostics : Default :: default ( ) ,
@@ -664,7 +664,7 @@ impl Handler {
664664 inner. deduplicated_warn_count = 0 ;
665665
666666 // actually free the underlying memory (which `clear` would not do)
667- inner. delayed_span_bugs = Default :: default ( ) ;
667+ inner. span_delayed_bugs = Default :: default ( ) ;
668668 inner. delayed_good_path_bugs = Default :: default ( ) ;
669669 inner. taught_diagnostics = Default :: default ( ) ;
670670 inner. emitted_diagnostic_codes = Default :: default ( ) ;
@@ -1078,8 +1078,8 @@ impl Handler {
10781078 ErrorGuaranteed :: unchecked_claim_error_was_emitted ( )
10791079 } )
10801080 }
1081- pub fn has_errors_or_delayed_span_bugs ( & self ) -> Option < ErrorGuaranteed > {
1082- self . inner . borrow ( ) . has_errors_or_delayed_span_bugs ( ) . then ( || {
1081+ pub fn has_errors_or_span_delayed_bugs ( & self ) -> Option < ErrorGuaranteed > {
1082+ self . inner . borrow ( ) . has_errors_or_span_delayed_bugs ( ) . then ( || {
10831083 #[ allow( deprecated) ]
10841084 ErrorGuaranteed :: unchecked_claim_error_was_emitted ( )
10851085 } )
@@ -1267,7 +1267,7 @@ impl Handler {
12671267
12681268 pub fn flush_delayed ( & self ) {
12691269 let mut inner = self . inner . lock ( ) ;
1270- let bugs = std:: mem:: replace ( & mut inner. delayed_span_bugs , Vec :: new ( ) ) ;
1270+ let bugs = std:: mem:: replace ( & mut inner. span_delayed_bugs , Vec :: new ( ) ) ;
12711271 inner. flush_delayed ( bugs, "no errors encountered even though `span_delayed_bug` issued" ) ;
12721272 }
12731273}
@@ -1325,11 +1325,11 @@ impl HandlerInner {
13251325
13261326 if diagnostic. level == Level :: DelayedBug {
13271327 // FIXME(eddyb) this should check for `has_errors` and stop pushing
1328- // once *any* errors were emitted (and truncate `delayed_span_bugs `
1328+ // once *any* errors were emitted (and truncate `span_delayed_bugs `
13291329 // when an error is first emitted, also), but maybe there's a case
13301330 // in which that's not sound? otherwise this is really inefficient.
13311331 let backtrace = std:: backtrace:: Backtrace :: capture ( ) ;
1332- self . delayed_span_bugs
1332+ self . span_delayed_bugs
13331333 . push ( DelayedDiagnostic :: with_backtrace ( diagnostic. clone ( ) , backtrace) ) ;
13341334
13351335 if !self . flags . report_delayed_bugs {
@@ -1444,7 +1444,7 @@ impl HandlerInner {
14441444 }
14451445
14461446 fn delayed_bug_count ( & self ) -> usize {
1447- self . delayed_span_bugs . len ( ) + self . delayed_good_path_bugs . len ( )
1447+ self . span_delayed_bugs . len ( ) + self . delayed_good_path_bugs . len ( )
14481448 }
14491449
14501450 fn print_error_count ( & mut self , registry : & Registry ) {
@@ -1565,15 +1565,15 @@ impl HandlerInner {
15651565 fn has_errors_or_lint_errors ( & self ) -> bool {
15661566 self . has_errors ( ) || self . lint_err_count > 0
15671567 }
1568- fn has_errors_or_delayed_span_bugs ( & self ) -> bool {
1569- self . has_errors ( ) || !self . delayed_span_bugs . is_empty ( )
1568+ fn has_errors_or_span_delayed_bugs ( & self ) -> bool {
1569+ self . has_errors ( ) || !self . span_delayed_bugs . is_empty ( )
15701570 }
15711571 fn has_any_message ( & self ) -> bool {
15721572 self . err_count ( ) > 0 || self . lint_err_count > 0 || self . warn_count > 0
15731573 }
15741574
15751575 fn is_compilation_going_to_fail ( & self ) -> bool {
1576- self . has_errors ( ) || self . lint_err_count > 0 || !self . delayed_span_bugs . is_empty ( )
1576+ self . has_errors ( ) || self . lint_err_count > 0 || !self . span_delayed_bugs . is_empty ( )
15771577 }
15781578
15791579 fn abort_if_errors ( & mut self ) {
0 commit comments