@@ -432,9 +432,9 @@ struct HandlerInner {
432
432
deduplicated_err_count : usize ,
433
433
emitter : Box < DynEmitter > ,
434
434
span_delayed_bugs : Vec < DelayedDiagnostic > ,
435
- delayed_good_path_bugs : Vec < DelayedDiagnostic > ,
435
+ good_path_delayed_bugs : Vec < DelayedDiagnostic > ,
436
436
/// This flag indicates that an expected diagnostic was emitted and suppressed.
437
- /// This is used for the `delayed_good_path_bugs ` check.
437
+ /// This is used for the `good_path_delayed_bugs ` check.
438
438
suppressed_expected_diag : bool ,
439
439
440
440
/// This set contains the `DiagnosticId` of all emitted diagnostics to avoid
@@ -549,16 +549,16 @@ impl Drop for HandlerInner {
549
549
self . flush_delayed ( bugs, "no errors encountered even though `span_delayed_bug` issued" ) ;
550
550
}
551
551
552
- // FIXME(eddyb) this explains what `delayed_good_path_bugs ` are!
552
+ // FIXME(eddyb) this explains what `good_path_delayed_bugs ` are!
553
553
// They're `span_delayed_bugs` but for "require some diagnostic happened"
554
554
// instead of "require some error happened". Sadly that isn't ideal, as
555
555
// lints can be `#[allow]`'d, potentially leading to this triggering.
556
556
// Also, "good path" should be replaced with a better naming.
557
557
if !self . has_any_message ( ) && !self . suppressed_expected_diag && !std:: thread:: panicking ( ) {
558
- let bugs = std:: mem:: replace ( & mut self . delayed_good_path_bugs , Vec :: new ( ) ) ;
558
+ let bugs = std:: mem:: replace ( & mut self . good_path_delayed_bugs , Vec :: new ( ) ) ;
559
559
self . flush_delayed (
560
560
bugs,
561
- "no warnings or errors encountered even though `delayed_good_path_bugs ` issued" ,
561
+ "no warnings or errors encountered even though `good_path_delayed_bugs ` issued" ,
562
562
) ;
563
563
}
564
564
@@ -610,7 +610,7 @@ impl Handler {
610
610
deduplicated_warn_count : 0 ,
611
611
emitter,
612
612
span_delayed_bugs : Vec :: new ( ) ,
613
- delayed_good_path_bugs : Vec :: new ( ) ,
613
+ good_path_delayed_bugs : Vec :: new ( ) ,
614
614
suppressed_expected_diag : false ,
615
615
taught_diagnostics : Default :: default ( ) ,
616
616
emitted_diagnostic_codes : Default :: default ( ) ,
@@ -665,7 +665,7 @@ impl Handler {
665
665
666
666
// actually free the underlying memory (which `clear` would not do)
667
667
inner. span_delayed_bugs = Default :: default ( ) ;
668
- inner. delayed_good_path_bugs = Default :: default ( ) ;
668
+ inner. good_path_delayed_bugs = Default :: default ( ) ;
669
669
inner. taught_diagnostics = Default :: default ( ) ;
670
670
inner. emitted_diagnostic_codes = Default :: default ( ) ;
671
671
inner. emitted_diagnostics = Default :: default ( ) ;
@@ -1008,8 +1008,8 @@ impl Handler {
1008
1008
1009
1009
// FIXME(eddyb) note the comment inside `impl Drop for HandlerInner`, that's
1010
1010
// where the explanation of what "good path" is (also, it should be renamed).
1011
- pub fn delay_good_path_bug ( & self , msg : impl Into < DiagnosticMessage > ) {
1012
- self . inner . borrow_mut ( ) . delay_good_path_bug ( msg)
1011
+ pub fn good_path_delayed_bug ( & self , msg : impl Into < DiagnosticMessage > ) {
1012
+ self . inner . borrow_mut ( ) . good_path_delayed_bug ( msg)
1013
1013
}
1014
1014
1015
1015
#[ track_caller]
@@ -1444,7 +1444,7 @@ impl HandlerInner {
1444
1444
}
1445
1445
1446
1446
fn delayed_bug_count ( & self ) -> usize {
1447
- self . span_delayed_bugs . len ( ) + self . delayed_good_path_bugs . len ( )
1447
+ self . span_delayed_bugs . len ( ) + self . good_path_delayed_bugs . len ( )
1448
1448
}
1449
1449
1450
1450
fn print_error_count ( & mut self , registry : & Registry ) {
@@ -1617,13 +1617,13 @@ impl HandlerInner {
1617
1617
1618
1618
// FIXME(eddyb) note the comment inside `impl Drop for HandlerInner`, that's
1619
1619
// where the explanation of what "good path" is (also, it should be renamed).
1620
- fn delay_good_path_bug ( & mut self , msg : impl Into < DiagnosticMessage > ) {
1620
+ fn good_path_delayed_bug ( & mut self , msg : impl Into < DiagnosticMessage > ) {
1621
1621
let mut diagnostic = Diagnostic :: new ( Level :: DelayedBug , msg) ;
1622
1622
if self . flags . report_delayed_bugs {
1623
1623
self . emit_diagnostic ( & mut diagnostic) ;
1624
1624
}
1625
1625
let backtrace = std:: backtrace:: Backtrace :: capture ( ) ;
1626
- self . delayed_good_path_bugs . push ( DelayedDiagnostic :: with_backtrace ( diagnostic, backtrace) ) ;
1626
+ self . good_path_delayed_bugs . push ( DelayedDiagnostic :: with_backtrace ( diagnostic, backtrace) ) ;
1627
1627
}
1628
1628
1629
1629
fn failure_note ( & mut self , msg : impl Into < DiagnosticMessage > ) {
0 commit comments