Skip to content

Conversation

nnethercote
Copy link
Contributor

A sequel to #121780.

r? @davidtwco

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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 Mar 7, 2024
@rustbot
Copy link
Collaborator

rustbot commented Mar 7, 2024

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred in exhaustiveness checking

cc @Nadrieril

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in need_type_info.rs

cc @lcnr

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

rustc_macros::diagnostics was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

LGTM, one suggestion, can be ignored or a follow-up or a change here.

@nnethercote
Copy link
Contributor Author

nnethercote commented Mar 8, 2024

New code is up, with some sizeable changes so I won't just r+ it myself.

Now derive(Diagnostic)/derive(Subdiagnostic)/derive(LintDiagnostic) are unchanged, but the corresponding trait names are changed to match the derive attributes:

  • trait IntoDiagnostic -> trait Diagnostic
  • trait AddToDiagnostic -> trait Subdiagnostic
  • trait DecorateLint -> trait LintDiagnostic

This also removes the need to rename various types, e.g. DiagnosticDeriveKind shouldn't be renamed DiagDeriveKind given that the trait/derive name is Diagnostic.

Overall this makes the change quite a bit smaller, which is nice.

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 8, 2024

📌 Commit b91031a has been approved by davidtwco

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 Mar 8, 2024
@bors
Copy link
Collaborator

bors commented Mar 8, 2024

☔ The latest upstream changes (presumably #122182) 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 Mar 8, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#121025 (add known-bug tests for derive failure to detect packed repr)
 - rust-lang#121194 (Refactor pre-getopts command line argument handling)
 - rust-lang#121563 (Use `ControlFlow` in visitors.)
 - rust-lang#122173 (Don't ICE in CTFE if raw/fn-ptr types differ)
 - rust-lang#122175 (Bless tidy issues order)
 - rust-lang#122179 (rustc: Fix typo)
 - rust-lang#122181 (Fix crash in internal late lint checking)
 - rust-lang#122183 (interpret: update comment about read_discriminant on uninhabited variants)

Failed merges:

 - rust-lang#122076 (Tweak the way we protect in-place function arguments in interpreters)
 - rust-lang#122132 (Diagnostic renaming 3)

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

Rollup of 8 pull requests

Successful merges:

 - rust-lang#121025 (add known-bug tests for derive failure to detect packed repr)
 - rust-lang#121194 (Refactor pre-getopts command line argument handling)
 - rust-lang#121563 (Use `ControlFlow` in visitors.)
 - rust-lang#122173 (Don't ICE in CTFE if raw/fn-ptr types differ)
 - rust-lang#122175 (Bless tidy issues order)
 - rust-lang#122179 (rustc: Fix typo)
 - rust-lang#122181 (Fix crash in internal late lint checking)
 - rust-lang#122183 (interpret: update comment about read_discriminant on uninhabited variants)

Failed merges:

 - rust-lang#122076 (Tweak the way we protect in-place function arguments in interpreters)
 - rust-lang#122132 (Diagnostic renaming 3)

r? `@ghost`
`@rustbot` modify labels: rollup
It's the only diagnostic in the entire project that impls `Default`, and
the code is clearer without it.
Also rename `into_diagnostic_arg` as `into_diag_arg`, and
`NotIntoDiagnosticArg` as `NotInotDiagArg`.
To match `derive(Diagnostic)`.

Also rename `into_diagnostic` as `into_diag`.
To match `derive(Subdiagnostic)`.

Also rename `add_to_diagnostic{,_with}` as `add_to_diag{,_with}`.
To match `derive(LintDiagnostic)`.
For increased consistency.

- session_diagnostic_derive    -> diagnostic_derive
- session_subdiagnostic_derive -> subdiagnostic_derive
- SubdiagnosticDeriveBuilder   -> SubdiagnosticDerive
@nnethercote
Copy link
Contributor Author

I rebased.

@bors r+ p=1

Because this is conflict-prone.

@bors
Copy link
Collaborator

bors commented Mar 10, 2024

📌 Commit 43c0633 has been approved by nnethercote

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 Mar 10, 2024
@bors
Copy link
Collaborator

bors commented Mar 11, 2024

⌛ Testing commit 43c0633 with merge cd81f5b...

@bors
Copy link
Collaborator

bors commented Mar 11, 2024

☀️ Test successful - checks-actions
Approved by: nnethercote
Pushing cd81f5b to master...

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cd81f5b): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.6% [-2.8%, -2.2%] 3
Improvements ✅
(secondary)
-2.3% [-3.2%, -1.5%] 10
All ❌✅ (primary) -2.6% [-2.8%, -2.2%] 3

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 646.276s -> 648.469s (0.34%)
Artifact size: 309.98 MiB -> 309.94 MiB (-0.01%)

@nnethercote nnethercote deleted the diag-renaming3 branch March 11, 2024 05:20
fmease pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Mar 12, 2024
GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this pull request Jul 10, 2024
…rcote

Diagnostic renaming 3

A sequel to rust-lang#121780.

r? `@davidtwco`
Kobzol pushed a commit to Kobzol/rust that referenced this pull request Dec 30, 2024
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Jan 2, 2025
Kobzol pushed a commit to Kobzol/rustc-dev-guide that referenced this pull request Jan 3, 2025
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) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic merged-by-bors This PR was explicitly merged by bors. 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