Skip to content

Commit a2b765f

Browse files
committed
Remove -Zdont-buffer-diagnostics.
It was added in rust-lang#54232. It seems like it was aimed at NLL development, which is well in the past. Also, it looks like `-Ztreat-err-as-bug` can be used to achieve the same effect. So it doesn't seem necessary.
1 parent ca663b0 commit a2b765f

File tree

5 files changed

+1
-10
lines changed

5 files changed

+1
-10
lines changed

compiler/rustc_errors/src/diagnostic_builder.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
266266
/// Converts the builder to a `Diagnostic` for later emission,
267267
/// unless dcx has disabled such buffering.
268268
pub fn into_diagnostic(mut self) -> Option<(Diagnostic, &'a DiagCtxt)> {
269-
let flags = self.dcx.inner.lock().flags;
270-
if flags.dont_buffer_diagnostics || flags.treat_err_as_bug.is_some() {
269+
if self.dcx.inner.lock().flags.treat_err_as_bug.is_some() {
271270
self.emit();
272271
return None;
273272
}

compiler/rustc_errors/src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,6 @@ pub struct DiagCtxtFlags {
524524
/// If Some, the Nth error-level diagnostic is upgraded to bug-level.
525525
/// (rustc: see `-Z treat-err-as-bug`)
526526
pub treat_err_as_bug: Option<NonZeroUsize>,
527-
/// If true, immediately emit diagnostics that would otherwise be buffered.
528-
/// (rustc: see `-Z dont-buffer-diagnostics` and `-Z treat-err-as-bug`)
529-
pub dont_buffer_diagnostics: bool,
530527
/// Show macro backtraces.
531528
/// (rustc: see `-Z macro-backtrace`)
532529
pub macro_backtrace: bool,

compiler/rustc_interface/src/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,6 @@ fn test_unstable_options_tracking_hash() {
659659
// tidy-alphabetical-start
660660
untracked!(assert_incr_state, Some(String::from("loaded")));
661661
untracked!(deduplicate_diagnostics, false);
662-
untracked!(dont_buffer_diagnostics, true);
663662
untracked!(dump_dep_graph, true);
664663
untracked!(dump_mir, Some(String::from("abc")));
665664
untracked!(dump_mir_dataflow, true);

compiler/rustc_session/src/config.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,6 @@ impl UnstableOptions {
11461146
DiagCtxtFlags {
11471147
can_emit_warnings,
11481148
treat_err_as_bug: self.treat_err_as_bug,
1149-
dont_buffer_diagnostics: self.dont_buffer_diagnostics,
11501149
macro_backtrace: self.macro_backtrace,
11511150
deduplicate_diagnostics: self.deduplicate_diagnostics,
11521151
track_diagnostics: self.track_diagnostics,

compiler/rustc_session/src/options.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1553,9 +1553,6 @@ options! {
15531553
dep_info_omit_d_target: bool = (false, parse_bool, [TRACKED],
15541554
"in dep-info output, omit targets for tracking dependencies of the dep-info files \
15551555
themselves (default: no)"),
1556-
dont_buffer_diagnostics: bool = (false, parse_bool, [UNTRACKED],
1557-
"emit diagnostics rather than buffering (breaks NLL error downgrading, sorting) \
1558-
(default: no)"),
15591556
dual_proc_macros: bool = (false, parse_bool, [TRACKED],
15601557
"load proc macros for both target and host, but only link to the target (default: no)"),
15611558
dump_dep_graph: bool = (false, parse_bool, [UNTRACKED],

0 commit comments

Comments
 (0)