Skip to content

Commit c28715b

Browse files
Rollup merge of rust-lang#119567 - nnethercote:rm-Zreport-delayed-bugs, r=oli-obk
Remove `-Zreport-delayed-bugs`. It's not used within the repository in any way (e.g. in tests), and doesn't seem useful. It was added in rust-lang#52568. r? ````@oli-obk````
2 parents e74a0cd + cf9484e commit c28715b

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

compiler/rustc_errors/src/lib.rs

+3-13
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,6 @@ pub struct DiagCtxtFlags {
525525
/// If true, immediately emit diagnostics that would otherwise be buffered.
526526
/// (rustc: see `-Z dont-buffer-diagnostics` and `-Z treat-err-as-bug`)
527527
pub dont_buffer_diagnostics: bool,
528-
/// If true, immediately print bugs registered with `span_delayed_bug`.
529-
/// (rustc: see `-Z report-delayed-bugs`)
530-
pub report_delayed_bugs: bool,
531528
/// Show macro backtraces.
532529
/// (rustc: see `-Z macro-backtrace`)
533530
pub macro_backtrace: bool,
@@ -994,7 +991,6 @@ impl DiagCtxt {
994991
) -> ErrorGuaranteed {
995992
let treat_next_err_as_bug = self.inner.borrow().treat_next_err_as_bug();
996993
if treat_next_err_as_bug {
997-
// FIXME: don't abort here if report_delayed_bugs is off
998994
self.span_bug(sp, msg);
999995
}
1000996
let mut diagnostic = Diagnostic::new(DelayedBug, msg);
@@ -1006,11 +1002,7 @@ impl DiagCtxt {
10061002
// where the explanation of what "good path" is (also, it should be renamed).
10071003
pub fn good_path_delayed_bug(&self, msg: impl Into<DiagnosticMessage>) {
10081004
let mut inner = self.inner.borrow_mut();
1009-
1010-
let mut diagnostic = Diagnostic::new(DelayedBug, msg);
1011-
if inner.flags.report_delayed_bugs {
1012-
inner.emit_diagnostic_without_consuming(&mut diagnostic);
1013-
}
1005+
let diagnostic = Diagnostic::new(DelayedBug, msg);
10141006
let backtrace = std::backtrace::Backtrace::capture();
10151007
inner.good_path_delayed_bugs.push(DelayedDiagnostic::with_backtrace(diagnostic, backtrace));
10161008
}
@@ -1420,10 +1412,8 @@ impl DiagCtxtInner {
14201412
self.span_delayed_bugs
14211413
.push(DelayedDiagnostic::with_backtrace(diagnostic.clone(), backtrace));
14221414

1423-
if !self.flags.report_delayed_bugs {
1424-
#[allow(deprecated)]
1425-
return Some(ErrorGuaranteed::unchecked_claim_error_was_emitted());
1426-
}
1415+
#[allow(deprecated)]
1416+
return Some(ErrorGuaranteed::unchecked_claim_error_was_emitted());
14271417
}
14281418

14291419
if diagnostic.has_future_breakage() {

compiler/rustc_interface/src/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,6 @@ fn test_unstable_options_tracking_hash() {
805805
tracked!(relax_elf_relocations, Some(true));
806806
tracked!(relro_level, Some(RelroLevel::Full));
807807
tracked!(remap_cwd_prefix, Some(PathBuf::from("abc")));
808-
tracked!(report_delayed_bugs, true);
809808
tracked!(sanitizer, SanitizerSet::ADDRESS);
810809
tracked!(sanitizer_cfi_canonical_jump_tables, None);
811810
tracked!(sanitizer_cfi_generalize_pointers, Some(true));

compiler/rustc_session/src/config.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,6 @@ impl UnstableOptions {
11471147
can_emit_warnings,
11481148
treat_err_as_bug: self.treat_err_as_bug,
11491149
dont_buffer_diagnostics: self.dont_buffer_diagnostics,
1150-
report_delayed_bugs: self.report_delayed_bugs,
11511150
macro_backtrace: self.macro_backtrace,
11521151
deduplicate_diagnostics: self.deduplicate_diagnostics,
11531152
track_diagnostics: self.track_diagnostics,

compiler/rustc_session/src/options.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1812,8 +1812,6 @@ options! {
18121812
remark_dir: Option<PathBuf> = (None, parse_opt_pathbuf, [UNTRACKED],
18131813
"directory into which to write optimization remarks (if not specified, they will be \
18141814
written to standard error output)"),
1815-
report_delayed_bugs: bool = (false, parse_bool, [TRACKED],
1816-
"immediately print bugs registered with `span_delayed_bug` (default: no)"),
18171815
sanitizer: SanitizerSet = (SanitizerSet::empty(), parse_sanitizers, [TRACKED],
18181816
"use a sanitizer"),
18191817
sanitizer_cfi_canonical_jump_tables: Option<bool> = (Some(true), parse_opt_bool, [TRACKED],

0 commit comments

Comments
 (0)