Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #119621

Merged
merged 44 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
505c137
Rename some `Diagnostic` setters.
nnethercote Dec 23, 2023
5fe5d5d
Remove lots of `rustc_errors::` qualifiers in `lints.rs`.
nnethercote Jan 2, 2024
096b844
Remove forward for `downgrade_to_delayed_bug`.
nnethercote Jan 3, 2024
caefa55
Fix up `forward!` decls.
nnethercote Jan 3, 2024
b4a6239
Fix `forward!` so it doesn't require trailing commas in some cases.
nnethercote Jan 3, 2024
0487500
Provide better suggestions when encountering a bare trait as a type
estebank Dec 20, 2023
8551cab
Account for multiple trait bounds in bare trait object suggestion
estebank Dec 20, 2023
79bef72
Track `HirId` instead of `Span` in `ObligationCauseCode::SizedArgumen…
estebank Dec 20, 2023
771966b
review comments
estebank Jan 3, 2024
1e92223
Remove unused `DiagnosticBuilder::struct_almost_fatal`.
nnethercote Jan 3, 2024
78ef946
Account for object unsafe traits
estebank Jan 3, 2024
9560c58
Avoid some `rustc_errors::` qualifiers.
nnethercote Jan 4, 2024
4d35981
Remove unused `struct_error` function.
nnethercote Jan 4, 2024
8e6bca6
Inline and remove `StringReader::struct_fatal_span_char`.
nnethercote Jan 4, 2024
698dfc3
Silence redundant warning when E0038 will be emitted
estebank Jan 3, 2024
af32054
Remove `-Zdump-mir-spanview`
Zalathar Jan 4, 2024
8388112
Remove `is_lint` field from `Level::Error`.
nnethercote Jan 4, 2024
cf9484e
Remove `-Zreport-delayed-bugs`.
nnethercote Jan 4, 2024
59c76fb
Make `intrinsics::assume` const stable
AngelicosPhosphoros Jan 4, 2024
35ad2ae
Fix invalid handling for static method calls in jump to definition fe…
GuillaumeGomez Jan 4, 2024
5bc7687
Add regression test for jump to def static method calls
GuillaumeGomez Jan 4, 2024
073ed0e
Move `i586-unknown-netbsd` from tier 2 to tier 3 platform support table
Nemo157 Jan 4, 2024
12b92c8
Visit only reachable blocks in MIR lint
tmiasko Dec 30, 2023
a084e06
Fix validation and linting of injected MIR
tmiasko Jan 1, 2024
df116ec
Migrate memory overlap check from validator to lint
tmiasko Jan 4, 2024
cb9abca
Rename `EmitterWriter` as `HumanEmitter`.
nnethercote Jan 4, 2024
c4d63c7
Rename `AnnotateSnippetEmitterWriter` as `AnnotateSnippetEmitter`.
nnethercote Jan 4, 2024
453ffac
Add some comments to `Emitter`.
nnethercote Jan 4, 2024
f9df1ad
Check for profiler support via a flag, instead of an environment var
Zalathar Oct 27, 2023
aa4bf0b
Allow tests to ignore individual test modes
Zalathar Nov 30, 2023
9ab8c63
Extract a `split_flags` helper in header directive parsing
Zalathar Jan 4, 2024
731ba80
Allow coverage tests to enable `llvm-cov --use-color`
Zalathar Dec 16, 2023
f5a09a9
Unbreak `tests/ui/lint/use_suggestion_json.rs`.
nnethercote Jan 5, 2024
8843223
Change printing of "`--error-format` is unstable" errors.
nnethercote Jan 5, 2024
d180e91
Rollup merge of #119034 - Zalathar:ignore-mode, r=davidtwco
compiler-errors Jan 5, 2024
f41ad1b
Rollup merge of #119148 - estebank:bare-traits, r=davidtwco
compiler-errors Jan 5, 2024
f361b59
Rollup merge of #119538 - nnethercote:cleanup-errors-5, r=compiler-er…
compiler-errors Jan 5, 2024
e74a0cd
Rollup merge of #119566 - Zalathar:remove-spanview, r=Swatinem,Nilstrieb
compiler-errors Jan 5, 2024
c28715b
Rollup merge of #119567 - nnethercote:rm-Zreport-delayed-bugs, r=oli-obk
compiler-errors Jan 5, 2024
3a983ad
Rollup merge of #119577 - tmiasko:lint, r=oli-obk
compiler-errors Jan 5, 2024
8bea1df
Rollup merge of #119583 - AngelicosPhosphoros:const_assume, r=RalfJung
compiler-errors Jan 5, 2024
3f19de6
Rollup merge of #119586 - GuillaumeGomez:jump-to-def-static-methods, …
compiler-errors Jan 5, 2024
3087b36
Rollup merge of #119588 - Nemo157:i586-netbsd-tier-3, r=Nilstrieb
compiler-errors Jan 5, 2024
da700b3
Rollup merge of #119601 - nnethercote:Emitter-cleanups, r=oli-obk
compiler-errors Jan 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove -Zreport-delayed-bugs.
It's not used within the repository in any way (e.g. in tests), and
doesn't seem useful.
  • Loading branch information
nnethercote committed Jan 4, 2024
commit cf9484e61551f3d4fad60dce49c89b83732e1622
16 changes: 3 additions & 13 deletions compiler/rustc_errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,6 @@ pub struct DiagCtxtFlags {
/// If true, immediately emit diagnostics that would otherwise be buffered.
/// (rustc: see `-Z dont-buffer-diagnostics` and `-Z treat-err-as-bug`)
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.
/// (rustc: see `-Z macro-backtrace`)
pub macro_backtrace: bool,
Expand Down Expand Up @@ -1004,7 +1001,6 @@ impl DiagCtxt {
) -> ErrorGuaranteed {
let treat_next_err_as_bug = self.inner.borrow().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);
}
let mut diagnostic = Diagnostic::new(DelayedBug, msg);
Expand All @@ -1016,11 +1012,7 @@ impl DiagCtxt {
// where the explanation of what "good path" is (also, it should be renamed).
pub fn good_path_delayed_bug(&self, msg: impl Into<DiagnosticMessage>) {
let mut inner = self.inner.borrow_mut();

let mut diagnostic = Diagnostic::new(DelayedBug, msg);
if inner.flags.report_delayed_bugs {
inner.emit_diagnostic_without_consuming(&mut diagnostic);
}
let diagnostic = Diagnostic::new(DelayedBug, msg);
let backtrace = std::backtrace::Backtrace::capture();
inner.good_path_delayed_bugs.push(DelayedDiagnostic::with_backtrace(diagnostic, backtrace));
}
Expand Down Expand Up @@ -1430,10 +1422,8 @@ impl DiagCtxtInner {
self.span_delayed_bugs
.push(DelayedDiagnostic::with_backtrace(diagnostic.clone(), backtrace));

if !self.flags.report_delayed_bugs {
#[allow(deprecated)]
return Some(ErrorGuaranteed::unchecked_claim_error_was_emitted());
}
#[allow(deprecated)]
return Some(ErrorGuaranteed::unchecked_claim_error_was_emitted());
}

if diagnostic.has_future_breakage() {
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_interface/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,6 @@ fn test_unstable_options_tracking_hash() {
tracked!(relax_elf_relocations, Some(true));
tracked!(relro_level, Some(RelroLevel::Full));
tracked!(remap_cwd_prefix, Some(PathBuf::from("abc")));
tracked!(report_delayed_bugs, true);
tracked!(sanitizer, SanitizerSet::ADDRESS);
tracked!(sanitizer_cfi_canonical_jump_tables, None);
tracked!(sanitizer_cfi_generalize_pointers, Some(true));
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,6 @@ impl UnstableOptions {
can_emit_warnings,
treat_err_as_bug: self.treat_err_as_bug,
dont_buffer_diagnostics: self.dont_buffer_diagnostics,
report_delayed_bugs: self.report_delayed_bugs,
macro_backtrace: self.macro_backtrace,
deduplicate_diagnostics: self.deduplicate_diagnostics,
track_diagnostics: self.track_diagnostics,
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1841,8 +1841,6 @@ options! {
remark_dir: Option<PathBuf> = (None, parse_opt_pathbuf, [UNTRACKED],
"directory into which to write optimization remarks (if not specified, they will be \
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],
"use a sanitizer"),
sanitizer_cfi_canonical_jump_tables: Option<bool> = (Some(true), parse_opt_bool, [TRACKED],
Expand Down
Loading