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

Remove -Zdont-buffer-diagnostics. #119723

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

nnethercote
Copy link
Contributor

It was added in #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.

r? @pnkfelix

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 7, 2024
if dcx.inner.lock().flags.dont_buffer_diagnostics
|| dcx.inner.lock().flags.treat_err_as_bug.is_some()
{
if dcx.inner.lock().flags.treat_err_as_bug.is_some() {
Copy link
Member

@compiler-errors compiler-errors Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it even serve a purpose to fire treat_err_as_bug for diagnostics that are, for example, created then canceled? Shouldn't we be checking treat_err_as_bug only on the emission path?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a fair question. There's a lot of special diagnostics cases (e.g. for other -Z options) that are dubious, because there are lots of different possible chokepoints for special diagnostic behaviour: emit, cancel, stash, buffer, into_diagnostic, etc. (And don't ask about how errors and warnings are counted, yikes, it's a mess.) I think people have just inserted them one by one over the years without necessarily having a full picture of the diagnostics system. I'm working my way through these, improving them as much as I can.

I can certainly give consideration to your question when I consider what to do with treat_err_as_bug, but I think that can wait until after this PR is merged. Indeed, this PR is exactly the kind of small cleanup that then smooths the way for other cleanups, like making treat_err_as_bug nicer.

@compiler-errors
Copy link
Member

@bors r+

If for some reason Felix disagrees with my approval and believes this flag should be kept around, I'll personally open a revert.

@bors
Copy link
Contributor

bors commented Jan 8, 2024

📌 Commit 74f5d51 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 8, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2024
…stics, r=compiler-errors

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.

r? `@pnkfelix`
@bors
Copy link
Contributor

bors commented Jan 8, 2024

☔ The latest upstream changes (presumably #119606) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 8, 2024
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.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 8, 2024
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#116343 (Stop mentioning internal lang items in no_std binary errors)
 - rust-lang#118903 (Improved support of collapse_debuginfo attribute for macros.)
 - rust-lang#119033 (coverage: `llvm-cov` expects column numbers to be bytes, not code points)
 - rust-lang#119598 (Fix a typo in core::ops::Deref's doc)
 - rust-lang#119660 (remove an unnecessary stderr-per-bitwidth)
 - rust-lang#119663 (tests: Normalize `\r\n` to `\n` in some run-make tests)
 - rust-lang#119681 (coverage: Anonymize line numbers in branch views)
 - rust-lang#119704 (Fix two variable binding issues in lint let_underscore)
 - rust-lang#119725 (Add helper for when we want to know if an item has a host param)
 - rust-lang#119738 (Add `riscv32imafc-esp-espidf` tier 3 target for the ESP32-P4.)
 - rust-lang#119740 (Remove crossbeam-channel)

Failed merges:

 - rust-lang#119723 (Remove `-Zdont-buffer-diagnostics`.)

r? `@ghost`
`@rustbot` modify labels: rollup
@nnethercote
Copy link
Contributor Author

Thanks for the review! I fixed the conflicts.

@bors r=compiler-errors rollup=always

@bors
Copy link
Contributor

bors commented Jan 8, 2024

📌 Commit a2b765f has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 8, 2024
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jan 9, 2024
…stics, r=compiler-errors

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.

r? `@pnkfelix`
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 9, 2024
…llaumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#117372 (Update stdarch submodule)
 - rust-lang#118241 (Making `User<T>` and `User<[T]>` `Send`)
 - rust-lang#118748 (std: getrandom simplification for freebsd.)
 - rust-lang#119527 (don't reexport atomic::ordering via rustc_data_structures, use std import)
 - rust-lang#119699 (Merge dead bb pruning and unreachable bb deduplication.)
 - rust-lang#119723 (Remove `-Zdont-buffer-diagnostics`.)
 - rust-lang#119756 (rustdoc-search: reuse individual types in function signatures)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 9, 2024
…llaumeGomez

Rollup of 9 pull requests

Successful merges:

 - rust-lang#117556 (Disallow reference to `static mut` and adding `static_mut_ref` lint)
 - rust-lang#118748 (std: getrandom simplification for freebsd.)
 - rust-lang#119282 (Rework and improve the unstable documentation of check-cfg)
 - rust-lang#119527 (don't reexport atomic::ordering via rustc_data_structures, use std import)
 - rust-lang#119668 (Simplify implementation of MIR promotion)
 - rust-lang#119699 (Merge dead bb pruning and unreachable bb deduplication.)
 - rust-lang#119723 (Remove `-Zdont-buffer-diagnostics`.)
 - rust-lang#119756 (rustdoc-search: reuse individual types in function signatures)
 - rust-lang#119758 (GNU/Hurd: unconditionally use inline stack probes)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 9, 2024
…llaumeGomez

Rollup of 9 pull requests

Successful merges:

 - rust-lang#117556 (Disallow reference to `static mut` and adding `static_mut_ref` lint)
 - rust-lang#118748 (std: getrandom simplification for freebsd.)
 - rust-lang#119282 (Rework and improve the unstable documentation of check-cfg)
 - rust-lang#119527 (don't reexport atomic::ordering via rustc_data_structures, use std import)
 - rust-lang#119668 (Simplify implementation of MIR promotion)
 - rust-lang#119699 (Merge dead bb pruning and unreachable bb deduplication.)
 - rust-lang#119723 (Remove `-Zdont-buffer-diagnostics`.)
 - rust-lang#119756 (rustdoc-search: reuse individual types in function signatures)
 - rust-lang#119758 (GNU/Hurd: unconditionally use inline stack probes)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b0aa3d8 into rust-lang:master Jan 9, 2024
11 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 9, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 9, 2024
Rollup merge of rust-lang#119723 - nnethercote:rm-Zdont-buffer-diagnostics, r=compiler-errors

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.

r? ``@pnkfelix``
@nnethercote nnethercote deleted the rm-Zdont-buffer-diagnostics branch January 9, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants