-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Reorder diagnostics API #120765
Merged
Merged
Reorder diagnostics API #120765
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Feb 8, 2024
Here's the API summary table I've been using for a while now, which I used to guide this PR.
|
compiler-errors
approved these changes
Feb 8, 2024
@bors r+ rollup |
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 8, 2024
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 8, 2024
…mpiler-errors Reorder diagnostics API The totally random ordering of diagnostic methods in `DiagCtxt` has been low-key driving me crazy for a while now. r? `@compiler-errors`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 8, 2024
…mpiler-errors Reorder diagnostics API The totally random ordering of diagnostic methods in `DiagCtxt` has been low-key driving me crazy for a while now. r? ``@compiler-errors``
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 8, 2024
…mpiler-errors Reorder diagnostics API The totally random ordering of diagnostic methods in `DiagCtxt` has been low-key driving me crazy for a while now. r? ```@compiler-errors```
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 8, 2024
…mpiler-errors Reorder diagnostics API The totally random ordering of diagnostic methods in `DiagCtxt` has been low-key driving me crazy for a while now. r? ````@compiler-errors````
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 8, 2024
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#113026 (Introduce `run-make` V2 infrastructure, a `run_make_support` library and port over 2 tests as example) - rust-lang#120589 (std::thread::available_parallelism merging linux/android/freebsd version) - rust-lang#120590 (Remove unused args from functions) - rust-lang#120596 ([rustdoc] Correctly generate path for non-local items in source code pages) - rust-lang#120693 (Invert diagnostic lints.) - rust-lang#120704 (A drive-by rewrite of `give_region_a_name()`) - rust-lang#120750 (No need to take `ImplTraitContext` by ref) - rust-lang#120765 (Reorder diagnostics API) - rust-lang#120772 (Remove myself from review rotation.) - rust-lang#120783 (Add release note for new ambiguous_wide_pointer_comparisons lint) Failed merges: - rust-lang#120782 (Fix mir pass ICE in the presence of other errors) r? `@ghost` `@rustbot` modify labels: rollup
The current order is almost perfectly random. This commit puts them into a predictable order in their own impl block, going from the highest level (`Block`) to the lowest (`Expect`). Within each level this is the order: - struct_err, err - struct_span_err, span_err - create_err, emit_err The first one in each pair creates a diagnostic, the second one creates *and* emits a diagnostic. Not every method is present for every level. The diff is messy, but other than moving methods around, the only thing it does is create the new `impl DiagCtxt` block with its own comment.
- Remove low-value comments about functionality that is obvious. - Add missing `track_caller` attributes -- every method should have one. - Adjust `rustc_lint_diagnostic` attributes. Every method involving a `impl Into<DiagnosticMessage>` or `impl Into<SubdiangnosticMessage>` argument should have one, except for those producing bugs, which aren't user-facing.
nnethercote
force-pushed
the
reorder-diag-API
branch
from
February 11, 2024 22:24
d1920a7
to
b7b6ebc
Compare
I fixed the conflicts. @bors r=compiler-errors |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Feb 12, 2024
…mpiler-errors Reorder diagnostics API The totally random ordering of diagnostic methods in `DiagCtxt` has been low-key driving me crazy for a while now. r? `@compiler-errors`
This was referenced Feb 12, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 12, 2024
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#120765 (Reorder diagnostics API) - rust-lang#120833 (More internal emit diagnostics cleanups) - rust-lang#120899 (Gracefully handle non-WF alias in `assemble_alias_bound_candidates_recur`) - rust-lang#120917 (Remove a bunch of dead parameters in functions) - rust-lang#120928 (Add test for recently fixed issue) - rust-lang#120933 (check_consts: fix duplicate errors, make importance consistent) - rust-lang#120936 (improve `btree_cursors` functions documentation) - rust-lang#120944 (Check that the ABI of the instance we are inlining is correct) - rust-lang#120956 (Clean inlined type alias with correct param-env) - rust-lang#120962 (Add myself to library/std review) - rust-lang#120972 (fix ICE for deref coercions with type errors) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 12, 2024
Rollup merge of rust-lang#120765 - nnethercote:reorder-diag-API, r=compiler-errors Reorder diagnostics API The totally random ordering of diagnostic methods in `DiagCtxt` has been low-key driving me crazy for a while now. r? ``@compiler-errors``
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Feb 26, 2024
…iaskrgr Rollup of 11 pull requests Successful merges: - rust-lang#120765 (Reorder diagnostics API) - rust-lang#120833 (More internal emit diagnostics cleanups) - rust-lang#120899 (Gracefully handle non-WF alias in `assemble_alias_bound_candidates_recur`) - rust-lang#120917 (Remove a bunch of dead parameters in functions) - rust-lang#120928 (Add test for recently fixed issue) - rust-lang#120933 (check_consts: fix duplicate errors, make importance consistent) - rust-lang#120936 (improve `btree_cursors` functions documentation) - rust-lang#120944 (Check that the ABI of the instance we are inlining is correct) - rust-lang#120956 (Clean inlined type alias with correct param-env) - rust-lang#120962 (Add myself to library/std review) - rust-lang#120972 (fix ICE for deref coercions with type errors) r? `@ghost` `@rustbot` modify labels: rollup
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The totally random ordering of diagnostic methods in
DiagCtxt
has been low-key driving me crazy for a while now.r? @compiler-errors