Skip to content

Migrate ambiguous plus diagnostic to the new derive macro - #96405

Merged
bors merged 10 commits into
rust-lang:masterfrom
pvdrz:ambiguous-plus-diagnostic
Apr 28, 2022
Merged

Migrate ambiguous plus diagnostic to the new derive macro#96405
bors merged 10 commits into
rust-lang:masterfrom
pvdrz:ambiguous-plus-diagnostic

Conversation

@pvdrz

Copy link
Copy Markdown
Contributor

@rustbotrustbot 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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.

@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.

Looks great, left some minor comments.

Comment threadcompiler/rustc_error_messages/locales/en-US/parser.ftl
Comment threadcompiler/rustc_parse/src/parser/diagnostics.rs Outdated
Comment threadcompiler/rustc_parse/src/parser/diagnostics.rs Outdated
@pvdrz
pvdrz requested a review from davidtwcoApril 26, 2022 13:15

@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.

Okay, one final small change, then r=me

Comment threadcompiler/rustc_parse/src/parser/diagnostics.rs Outdated
@oli-obk

Copy link
Copy Markdown
Contributor

@bors r=davidtwco

@bors

bors commented Apr 27, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit e7ae9eb has been approved by davidtwco

@borsbors 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-DPCDylan-DPC mentioned this pull request Apr 27, 2022
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-DPCDylan-DPC mentioned this pull request Apr 28, 2022
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-DPCDylan-DPC mentioned this pull request Apr 28, 2022
@Dylan-DPCDylan-DPC mentioned this pull request Apr 28, 2022
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:masterApr 28, 2022
@rustbotrustbot added this to the 1.62.0 milestone Apr 28, 2022
@compiler-errorscompiler-errors added the A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic label Aug 11, 2022
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.

8 participants

@pvdrz@oli-obk@bors@davidtwco@estebank@Manishearth@compiler-errors@rustbot