Remove -Zreport-delayed-bugs
.
It's not used within the repository in any way (e.g. in tests), and doesn't seem useful.
This commit is contained in:
parent
e51e98dde6
commit
cf9484e615
@ -525,9 +525,6 @@ pub struct DiagCtxtFlags {
|
|||||||
/// If true, immediately emit diagnostics that would otherwise be buffered.
|
/// If true, immediately emit diagnostics that would otherwise be buffered.
|
||||||
/// (rustc: see `-Z dont-buffer-diagnostics` and `-Z treat-err-as-bug`)
|
/// (rustc: see `-Z dont-buffer-diagnostics` and `-Z treat-err-as-bug`)
|
||||||
pub dont_buffer_diagnostics: bool,
|
pub dont_buffer_diagnostics: bool,
|
||||||
/// If true, immediately print bugs registered with `span_delayed_bug`.
|
|
||||||
/// (rustc: see `-Z report-delayed-bugs`)
|
|
||||||
pub report_delayed_bugs: bool,
|
|
||||||
/// Show macro backtraces.
|
/// Show macro backtraces.
|
||||||
/// (rustc: see `-Z macro-backtrace`)
|
/// (rustc: see `-Z macro-backtrace`)
|
||||||
pub macro_backtrace: bool,
|
pub macro_backtrace: bool,
|
||||||
@ -1004,7 +1001,6 @@ impl DiagCtxt {
|
|||||||
) -> ErrorGuaranteed {
|
) -> ErrorGuaranteed {
|
||||||
let treat_next_err_as_bug = self.inner.borrow().treat_next_err_as_bug();
|
let treat_next_err_as_bug = self.inner.borrow().treat_next_err_as_bug();
|
||||||
if treat_next_err_as_bug {
|
if treat_next_err_as_bug {
|
||||||
// FIXME: don't abort here if report_delayed_bugs is off
|
|
||||||
self.span_bug(sp, msg);
|
self.span_bug(sp, msg);
|
||||||
}
|
}
|
||||||
let mut diagnostic = Diagnostic::new(DelayedBug, msg);
|
let mut diagnostic = Diagnostic::new(DelayedBug, msg);
|
||||||
@ -1016,11 +1012,7 @@ impl DiagCtxt {
|
|||||||
// where the explanation of what "good path" is (also, it should be renamed).
|
// where the explanation of what "good path" is (also, it should be renamed).
|
||||||
pub fn good_path_delayed_bug(&self, msg: impl Into<DiagnosticMessage>) {
|
pub fn good_path_delayed_bug(&self, msg: impl Into<DiagnosticMessage>) {
|
||||||
let mut inner = self.inner.borrow_mut();
|
let mut inner = self.inner.borrow_mut();
|
||||||
|
let diagnostic = Diagnostic::new(DelayedBug, msg);
|
||||||
let mut diagnostic = Diagnostic::new(DelayedBug, msg);
|
|
||||||
if inner.flags.report_delayed_bugs {
|
|
||||||
inner.emit_diagnostic_without_consuming(&mut diagnostic);
|
|
||||||
}
|
|
||||||
let backtrace = std::backtrace::Backtrace::capture();
|
let backtrace = std::backtrace::Backtrace::capture();
|
||||||
inner.good_path_delayed_bugs.push(DelayedDiagnostic::with_backtrace(diagnostic, backtrace));
|
inner.good_path_delayed_bugs.push(DelayedDiagnostic::with_backtrace(diagnostic, backtrace));
|
||||||
}
|
}
|
||||||
@ -1430,11 +1422,9 @@ impl DiagCtxtInner {
|
|||||||
self.span_delayed_bugs
|
self.span_delayed_bugs
|
||||||
.push(DelayedDiagnostic::with_backtrace(diagnostic.clone(), backtrace));
|
.push(DelayedDiagnostic::with_backtrace(diagnostic.clone(), backtrace));
|
||||||
|
|
||||||
if !self.flags.report_delayed_bugs {
|
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
return Some(ErrorGuaranteed::unchecked_claim_error_was_emitted());
|
return Some(ErrorGuaranteed::unchecked_claim_error_was_emitted());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if diagnostic.has_future_breakage() {
|
if diagnostic.has_future_breakage() {
|
||||||
// Future breakages aren't emitted if they're Level::Allow,
|
// Future breakages aren't emitted if they're Level::Allow,
|
||||||
|
@ -806,7 +806,6 @@ fn test_unstable_options_tracking_hash() {
|
|||||||
tracked!(relax_elf_relocations, Some(true));
|
tracked!(relax_elf_relocations, Some(true));
|
||||||
tracked!(relro_level, Some(RelroLevel::Full));
|
tracked!(relro_level, Some(RelroLevel::Full));
|
||||||
tracked!(remap_cwd_prefix, Some(PathBuf::from("abc")));
|
tracked!(remap_cwd_prefix, Some(PathBuf::from("abc")));
|
||||||
tracked!(report_delayed_bugs, true);
|
|
||||||
tracked!(sanitizer, SanitizerSet::ADDRESS);
|
tracked!(sanitizer, SanitizerSet::ADDRESS);
|
||||||
tracked!(sanitizer_cfi_canonical_jump_tables, None);
|
tracked!(sanitizer_cfi_canonical_jump_tables, None);
|
||||||
tracked!(sanitizer_cfi_generalize_pointers, Some(true));
|
tracked!(sanitizer_cfi_generalize_pointers, Some(true));
|
||||||
|
@ -1162,7 +1162,6 @@ impl UnstableOptions {
|
|||||||
can_emit_warnings,
|
can_emit_warnings,
|
||||||
treat_err_as_bug: self.treat_err_as_bug,
|
treat_err_as_bug: self.treat_err_as_bug,
|
||||||
dont_buffer_diagnostics: self.dont_buffer_diagnostics,
|
dont_buffer_diagnostics: self.dont_buffer_diagnostics,
|
||||||
report_delayed_bugs: self.report_delayed_bugs,
|
|
||||||
macro_backtrace: self.macro_backtrace,
|
macro_backtrace: self.macro_backtrace,
|
||||||
deduplicate_diagnostics: self.deduplicate_diagnostics,
|
deduplicate_diagnostics: self.deduplicate_diagnostics,
|
||||||
track_diagnostics: self.track_diagnostics,
|
track_diagnostics: self.track_diagnostics,
|
||||||
|
@ -1841,8 +1841,6 @@ options! {
|
|||||||
remark_dir: Option<PathBuf> = (None, parse_opt_pathbuf, [UNTRACKED],
|
remark_dir: Option<PathBuf> = (None, parse_opt_pathbuf, [UNTRACKED],
|
||||||
"directory into which to write optimization remarks (if not specified, they will be \
|
"directory into which to write optimization remarks (if not specified, they will be \
|
||||||
written to standard error output)"),
|
written to standard error output)"),
|
||||||
report_delayed_bugs: bool = (false, parse_bool, [TRACKED],
|
|
||||||
"immediately print bugs registered with `span_delayed_bug` (default: no)"),
|
|
||||||
sanitizer: SanitizerSet = (SanitizerSet::empty(), parse_sanitizers, [TRACKED],
|
sanitizer: SanitizerSet = (SanitizerSet::empty(), parse_sanitizers, [TRACKED],
|
||||||
"use a sanitizer"),
|
"use a sanitizer"),
|
||||||
sanitizer_cfi_canonical_jump_tables: Option<bool> = (Some(true), parse_opt_bool, [TRACKED],
|
sanitizer_cfi_canonical_jump_tables: Option<bool> = (Some(true), parse_opt_bool, [TRACKED],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user