Skip to content

Allow deriving multipart suggestions - #100970

Merged
bors merged 5 commits into
rust-lang:masterfrom
Xiretza:derive-multipart-suggestion
Aug 31, 2022
Merged

Allow deriving multipart suggestions#100970
bors merged 5 commits into
rust-lang:masterfrom
Xiretza:derive-multipart-suggestion

Conversation

@Xiretza

Copy link
Copy Markdown
Contributor

This turned into a bit more of a rewrite than I was initially hoping for... Still, I think the SessionSubdiagnostic derive is a little cleaner overall now, and closer to the SessionDiagnostic derive to make future code sharing easier.

r? @davidtwco

@rustbot

Copy link
Copy Markdown
Collaborator

rustc_macros::diagnostics was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

@rustbotrustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 24, 2022
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 24, 2022
Comment threadcompiler/rustc_macros/src/diagnostics/subdiagnostic_builder.rs Outdated
Comment threadcompiler/rustc_macros/src/diagnostics/subdiagnostic_builder.rs Outdated

@davidtwcodavidtwco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is really great, thanks for working on it. I'm excited to have this additional capability - do you think it would be too much additional work to go through and convert some of the manual AddToDiagnostic impls in error.rs files to use this in a commit?

Comment threadcompiler/rustc_macros/src/diagnostics/subdiagnostic_builder.rs Outdated
Comment threadcompiler/rustc_macros/src/diagnostics/subdiagnostic_builder.rs Outdated
Comment threadcompiler/rustc_macros/src/diagnostics/subdiagnostic_builder.rs Outdated
Comment threadcompiler/rustc_macros/src/diagnostics/subdiagnostic_builder.rs Outdated
Comment threadcompiler/rustc_macros/src/diagnostics/subdiagnostic_builder.rs Outdated
Comment threadcompiler/rustc_macros/src/diagnostics/subdiagnostic_builder.rs Outdated
Comment threadcompiler/rustc_macros/src/diagnostics/subdiagnostic_builder.rs Outdated
Comment threadsrc/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs Outdated
Comment threadcompiler/rustc_macros/src/diagnostics/mod.rs Outdated
Comment threadcompiler/rustc_macros/src/diagnostics/subdiagnostic_builder.rs Outdated
@davidtwcodavidtwco 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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 25, 2022
@Xiretza
Xiretzaforce-pushed the derive-multipart-suggestion branch 3 times, most recently from 6993b27 to 62e35e4CompareAugust 26, 2022 09:42
@Xiretza

Copy link
Copy Markdown
ContributorAuthor

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 26, 2022
Comment threadsrc/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr Outdated
@Xiretza
Xiretzaforce-pushed the derive-multipart-suggestion branch from 62e35e4 to 72541ddCompareAugust 26, 2022 15:44
@Xiretza
Xiretza requested a review from davidtwcoAugust 26, 2022 15:44
@davidtwco

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Aug 26, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 72541dd has been approved by davidtwco

It is now in the queue for this repository.

@borsbors 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 Aug 26, 2022
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Aug 27, 2022
…n, r=davidtwco
Allow deriving multipart suggestions
This turned into a bit more of a rewrite than I was initially hoping for... Still, I think the `SessionSubdiagnostic` derive is a little cleaner overall now, and closer to the `SessionDiagnostic` derive to make future code sharing easier.
r? `@davidtwco`
@bors

This comment was marked as resolved.

@borsbors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 29, 2022
@borsbors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 29, 2022
@Xiretza
Xiretzaforce-pushed the derive-multipart-suggestion branch from 72541dd to 91c3323CompareAugust 30, 2022 08:11
@Xiretza
Xiretzaforce-pushed the derive-multipart-suggestion branch from 91c3323 to 31b939bCompareAugust 30, 2022 10:19
@Xiretza

Copy link
Copy Markdown
ContributorAuthor

@rustbot ready

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 30, 2022
@davidtwco

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Aug 30, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 31b939b has been approved by davidtwco

It is now in the queue for this repository.

@borsbors 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 Aug 30, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Aug 31, 2022
…n, r=davidtwco
Allow deriving multipart suggestions
This turned into a bit more of a rewrite than I was initially hoping for... Still, I think the `SessionSubdiagnostic` derive is a little cleaner overall now, and closer to the `SessionDiagnostic` derive to make future code sharing easier.
r? `@davidtwco`
This was referenced Aug 31, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 31, 2022
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#100970 (Allow deriving multipart suggestions)
- rust-lang#100984 (Reinstate preloading of some dll imports)
- rust-lang#101011 (Use getentropy when possible on all Apple platforms)
- rust-lang#101025 (Add tier-3 support for powerpc64 and riscv64 openbsd)
- rust-lang#101049 (Remove span fatal from ast lowering)
- rust-lang#101100 (Make call suggestions more general and more accurate)
- rust-lang#101171 (Fix UB from misalignment and provenance widening in `std::sys::windows`)
- rust-lang#101185 (Tweak `WellFormedLoc`s a bit)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit ea9c370 into rust-lang:masterAug 31, 2022
@rustbotrustbot added this to the 1.65.0 milestone Aug 31, 2022
@XiretzaXiretza mentioned this pull request Sep 1, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 2, 2022
…idtwco
Fixrust-lang#100844 rebase accident
This undoes the rebase accident in rust-lang#100844, which accidentally caused rust-lang#100970 to be reverted.
@Xiretza
Xiretza deleted the derive-multipart-suggestion branch September 6, 2022 15:35
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-translationArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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

@Xiretza@rustbot@davidtwco@bors@rust-highfive