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 force_print_diagnostic #121014

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

nnethercote
Copy link
Contributor

More diagnostic cleanups, best reviewed one at a time.

r? @oli-obk

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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 Feb 13, 2024
@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor

oli-obk commented Feb 13, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 13, 2024

📌 Commit 76f9cdb has been approved by oli-obk

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 Feb 13, 2024
@oli-obk
Copy link
Contributor

oli-obk commented Feb 13, 2024

@bors r-

@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 Feb 13, 2024
@nnethercote
Copy link
Contributor Author

I fixed the test failure.

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Feb 13, 2024

📌 Commit 63366e9 has been approved by oli-obk

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 Feb 13, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#114877 (unstable-book: add quick-edit link)
 - rust-lang#120548 (rustdoc: Fix handling of doc_auto_cfg feature for cfg attributes on glob reexport)
 - rust-lang#120549 (modify alias-relate to also normalize ambiguous opaques)
 - rust-lang#120959 (Remove good path delayed bugs)
 - rust-lang#120978 (match lowering: simplify block creation)
 - rust-lang#121019 (coverage: Simplify some parts of the coverage span refiner)
 - rust-lang#121021 (Extend intra-doc link chapter in the rustdoc book)
 - rust-lang#121031 (RustWrapper: adapt for coverage mapping API changes)

Failed merges:

 - rust-lang#121014 (Remove `force_print_diagnostic`)

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

bors commented Feb 13, 2024

☔ The latest upstream changes (presumably #121036) 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 Feb 13, 2024
So it follows the same pattern as all the other `struct_span_*` methods.
There are a couple of places where we call
`inner.emitter.emit_diagnostic` directly rather than going through
`inner.emit_diagnostic`, to guarantee the diagnostic is printed. This
feels dubious to me, particularly the bypassing of `TRACK_DIAGNOSTIC`.

This commit removes those.
- In `print_error_count`, it uses `ForceWarning` instead of `Warning`.
- It removes `DiagCtxtInner::failure_note`, because it only has three
  uses and direct use of `emit_diagnostic` is consistent with other
  similar locations.
- It removes `force_print_diagnostic`, and adds `struct_failure_note`,
  and updates `print_query_stack` accordingly, which makes it more
  normal. That location doesn't seem to need forced printing anyway.
Several fields were not being reset. Using destructuring makes it much
harder to miss a field.
@nnethercote
Copy link
Contributor Author

I rebased.

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Feb 13, 2024

📌 Commit 56b451a has been approved by oli-obk

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 Feb 13, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#118882 (Check normalized call signature for WF in mir typeck)
 - rust-lang#120999 (rustdoc: replace `clean::InstantiationParam` with `clean::GenericArg`)
 - rust-lang#121002 (remove unnecessary calls to `commit_if_ok`)
 - rust-lang#121005 (Remove jsha from the rustdoc review rotation)
 - rust-lang#121014 (Remove `force_print_diagnostic`)
 - rust-lang#121043 (add lcnr to the compiler-team assignment group)
 - rust-lang#121046 (Fix incorrect use of `compile_fail`)
 - rust-lang#121047 (Do not assemble candidates for default impls)

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

Rollup of 8 pull requests

Successful merges:

 - rust-lang#118882 (Check normalized call signature for WF in mir typeck)
 - rust-lang#120999 (rustdoc: replace `clean::InstantiationParam` with `clean::GenericArg`)
 - rust-lang#121002 (remove unnecessary calls to `commit_if_ok`)
 - rust-lang#121005 (Remove jsha from the rustdoc review rotation)
 - rust-lang#121014 (Remove `force_print_diagnostic`)
 - rust-lang#121043 (add lcnr to the compiler-team assignment group)
 - rust-lang#121046 (Fix incorrect use of `compile_fail`)
 - rust-lang#121047 (Do not assemble candidates for default impls)

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

Rollup of 8 pull requests

Successful merges:

 - rust-lang#118882 (Check normalized call signature for WF in mir typeck)
 - rust-lang#120999 (rustdoc: replace `clean::InstantiationParam` with `clean::GenericArg`)
 - rust-lang#121002 (remove unnecessary calls to `commit_if_ok`)
 - rust-lang#121005 (Remove jsha from the rustdoc review rotation)
 - rust-lang#121014 (Remove `force_print_diagnostic`)
 - rust-lang#121043 (add lcnr to the compiler-team assignment group)
 - rust-lang#121046 (Fix incorrect use of `compile_fail`)
 - rust-lang#121047 (Do not assemble candidates for default impls)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8c0d54f into rust-lang:master Feb 14, 2024
11 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 14, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 14, 2024
Rollup merge of rust-lang#121014 - nnethercote:rm-force_print_diagnostic, r=oli-obk

Remove `force_print_diagnostic`

More diagnostic cleanups, best reviewed one at a time.

r? `@oli-obk`
@nnethercote nnethercote deleted the rm-force_print_diagnostic branch February 14, 2024 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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