Skip to content
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

Don't omit comma when suggesting wildcard arm after macro expr #98267

Merged
merged 3 commits into from
Jun 21, 2022

Conversation

compiler-errors
Copy link
Member

  • Also adds Span::eq_ctxt to consolidate the various usages of span.ctxt() == other.ctxt()
  • Also fixes an unhygenic usage of spans which caused the suggestion to render weirdly when we had one arm match in a macro
  • Also always suggests a comma (i.e. even after a block) if we're rendering a wildcard arm in a single-line match (looks prettier 🌹)

Fixes #94866

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 19, 2022
@rust-highfive
Copy link
Collaborator

r? @oli-obk

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 19, 2022
@oli-obk
Copy link
Contributor

oli-obk commented Jun 20, 2022

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 20, 2022

📌 Commit 3d16c22 has been approved by oli-obk

@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 20, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 20, 2022
…askrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#98235 (Drop magic value 3 from code)
 - rust-lang#98267 (Don't omit comma when suggesting wildcard arm after macro expr)
 - rust-lang#98276 (Mention formatting macros when encountering `ArgumentV1` method in const)
 - rust-lang#98296 (Add a link to the unstable book page on Generator doc comment)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3e5800b into rust-lang:master Jun 21, 2022
@rustbot rustbot added this to the 1.63.0 milestone Jun 21, 2022
@compiler-errors compiler-errors deleted the suggest-wildcard-arm branch August 11, 2023 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Invalid syntax (missing comma) in non-exhaustive patterns error's suggestion involving macros
5 participants