Skip to content

Only args in main diag are saved and restored without removing the newly added ones #143060

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xizheyin
Copy link
Contributor

@xizheyin xizheyin commented Jun 26, 2025

cc #142724

Here's a more simplified approach, since we'll be storing and restoring the main diagnostic's arg, removing args newly added isn't needed in the derive subdiagnostic implementation. remove_arg is helpful only for manual implementation of subdiagnostic.

r? @oli-obk

@rustbot rustbot added 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 Jun 26, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 26, 2025

rustc_macros::diagnostics was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

@oli-obk
Copy link
Contributor

oli-obk commented Jun 27, 2025

ah yea, good point

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 27, 2025

📌 Commit d1f3136 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 Jun 27, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 27, 2025
Only args in main diag are saved and restored without removing the newly added ones

cc rust-lang#142724

Here's a more simplified approach, since we'll be storing and restoring the main diagnostic's arg, removing args newly added isn't needed in the derive subdiagnostic implementation. `remove_arg` is helpful only for manual implementation of subdiagnostic.

r? `@oli-obk`
bors added a commit that referenced this pull request Jun 27, 2025
Rollup of 6 pull requests

Successful merges:

 - #142270 (Rustdoc js: even more typechecking improvements)
 - #142420 (Report infer ty errors during hir ty lowering)
 - #142818 (Port `#[used]` to new attribute parsing infrastructure)
 - #143020 (codegen_fn_attrs: make comment more precise)
 - #143036 (Remove support for `dyn*` from the compiler)
 - #143060 (Only args in main diag are saved and restored without removing the newly added ones)

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
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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.
4 participants