Skip to content

Migrate ambiguous plus diagnostic to the new derive macro #96405

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 10 commits into from
Apr 28, 2022

Conversation

pvdrz
Copy link
Contributor

@pvdrz pvdrz commented Apr 25, 2022

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 25, 2022
Comment on lines 1174 to 1181
#[derive(SessionDiagnostic)]
#[error(slug = "parser-maybe-report-ambiguous-plus")]
struct AmbiguousPlus {
pub sum_with_parens: String,
#[primary_span]
#[suggestion(code = "{sum_with_parens}")]
pub span: Span,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't want to push more work on you, but this might be a good time to check if multipart_suggestion support works as expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd be happy to do it but I couldn't find any examples on how to use it.

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.

Looks great, left some minor comments.

@pvdrz pvdrz requested a review from davidtwco April 26, 2022 13:15
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.

Okay, one final small change, then r=me

@oli-obk
Copy link
Contributor

oli-obk commented Apr 27, 2022

@bors r=davidtwco

@bors
Copy link
Collaborator

bors commented Apr 27, 2022

📌 Commit e7ae9eb has been approved by davidtwco

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 27, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 27, 2022
…davidtwco

Migrate ambiguous plus diagnostic to the new derive macro

r? `@davidtwco` `@jyn514`
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 28, 2022
…davidtwco

Migrate ambiguous plus diagnostic to the new derive macro

r? ``@davidtwco`` ``@jyn514``
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 28, 2022
…davidtwco

Migrate ambiguous plus diagnostic to the new derive macro

r? ```@davidtwco``` ```@jyn514```
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 28, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#95312 (Ensure that `'_` and GAT yields errors)
 - rust-lang#96405 (Migrate ambiguous plus diagnostic to the new derive macro)
 - rust-lang#96409 (Recover suggestions to introduce named lifetime under NLL)
 - rust-lang#96433 (rustc_ast: Harmonize delimiter naming with `proc_macro::Delimiter`)
 - rust-lang#96480 (Fixed grammatical error in example comment)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b3329f8 into rust-lang:master Apr 28, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 28, 2022
@compiler-errors compiler-errors added the A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic label Aug 11, 2022
# for free to join this conversation on GitHub. Already have an account? # 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants