-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
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() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
@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. |
…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`
☔ The latest upstream changes (presumably #119606) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
…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
74f5d51
to
a2b765f
Compare
Thanks for the review! I fixed the conflicts. @bors r=compiler-errors rollup=always |
…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`
…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
…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
…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
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``
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