@@ -413,13 +413,13 @@ use std::backtrace::{Backtrace, BacktraceStatus};
413
413
/// Certain errors (fatal, bug, unimpl) may cause immediate exit,
414
414
/// others log errors for later reporting.
415
415
pub struct DiagCtxt {
416
- inner : Lock < HandlerInner > ,
416
+ inner : Lock < DiagCtxtInner > ,
417
417
}
418
418
419
419
/// This inner struct exists to keep it all behind a single lock;
420
420
/// this is done to prevent possible deadlocks in a multi-threaded compiler,
421
421
/// as well as inconsistent state observation.
422
- struct HandlerInner {
422
+ struct DiagCtxtInner {
423
423
flags : HandlerFlags ,
424
424
/// The number of lint errors that have been emitted.
425
425
lint_err_count : usize ,
@@ -540,7 +540,7 @@ pub struct HandlerFlags {
540
540
pub track_diagnostics : bool ,
541
541
}
542
542
543
- impl Drop for HandlerInner {
543
+ impl Drop for DiagCtxtInner {
544
544
fn drop ( & mut self ) {
545
545
self . emit_stashed_diagnostics ( ) ;
546
546
@@ -597,7 +597,7 @@ impl DiagCtxt {
597
597
598
598
pub fn with_emitter ( emitter : Box < DynEmitter > ) -> Self {
599
599
Self {
600
- inner : Lock :: new ( HandlerInner {
600
+ inner : Lock :: new ( DiagCtxtInner {
601
601
flags : HandlerFlags { can_emit_warnings : true , ..Default :: default ( ) } ,
602
602
lint_err_count : 0 ,
603
603
err_count : 0 ,
@@ -1057,7 +1057,7 @@ impl DiagCtxt {
1057
1057
inner. emit_diagnostic ( diagnostic) . unwrap ( )
1058
1058
}
1059
1059
1060
- // FIXME(eddyb) note the comment inside `impl Drop for HandlerInner `, that's
1060
+ // FIXME(eddyb) note the comment inside `impl Drop for DiagCtxtInner `, that's
1061
1061
// where the explanation of what "good path" is (also, it should be renamed).
1062
1062
pub fn good_path_delayed_bug ( & self , msg : impl Into < DiagnosticMessage > ) {
1063
1063
let mut inner = self . inner . borrow_mut ( ) ;
@@ -1396,12 +1396,12 @@ impl DiagCtxt {
1396
1396
}
1397
1397
1398
1398
/// This methods steals all [`LintExpectationId`]s that are stored inside
1399
- /// [`HandlerInner `] and indicate that the linked expectation has been fulfilled.
1399
+ /// [`DiagCtxtInner `] and indicate that the linked expectation has been fulfilled.
1400
1400
#[ must_use]
1401
1401
pub fn steal_fulfilled_expectation_ids ( & self ) -> FxHashSet < LintExpectationId > {
1402
1402
assert ! (
1403
1403
self . inner. borrow( ) . unstable_expect_diagnostics. is_empty( ) ,
1404
- "`HandlerInner ::unstable_expect_diagnostics` should be empty at this point" ,
1404
+ "`DiagCtxtInner ::unstable_expect_diagnostics` should be empty at this point" ,
1405
1405
) ;
1406
1406
std:: mem:: take ( & mut self . inner . borrow_mut ( ) . fulfilled_expectations )
1407
1407
}
@@ -1414,10 +1414,10 @@ impl DiagCtxt {
1414
1414
}
1415
1415
1416
1416
// Note: we prefer implementing operations on `DiagCtxt`, rather than
1417
- // `HandlerInner `, whenever possible. This minimizes functions where
1417
+ // `DiagCtxtInner `, whenever possible. This minimizes functions where
1418
1418
// `DiagCtxt::foo()` just borrows `inner` and forwards a call to
1419
1419
// `HanderInner::foo`.
1420
- impl HandlerInner {
1420
+ impl DiagCtxtInner {
1421
1421
/// Emit all stashed diagnostics.
1422
1422
fn emit_stashed_diagnostics ( & mut self ) -> Option < ErrorGuaranteed > {
1423
1423
let has_errors = self . has_errors ( ) ;
0 commit comments