summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_errors/src/diagnostic_builder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_errors/src/diagnostic_builder.rs')
-rw-r--r--compiler/rustc_errors/src/diagnostic_builder.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs
index 08ff2cfba..5e23ae655 100644
--- a/compiler/rustc_errors/src/diagnostic_builder.rs
+++ b/compiler/rustc_errors/src/diagnostic_builder.rs
@@ -536,7 +536,9 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
}
};
- if handler.flags.dont_buffer_diagnostics || handler.flags.treat_err_as_bug.is_some() {
+ if handler.inner.lock().flags.dont_buffer_diagnostics
+ || handler.inner.lock().flags.treat_err_as_bug.is_some()
+ {
self.emit();
return None;
}