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

Suggest swapping the order of ref and box #118359

Merged
merged 1 commit into from Nov 27, 2023

Conversation

hkmatsumoto
Copy link
Member

It is not valid grammar to write ref box <ident> in patterns, but box ref <ident> is.
This patch adds a diagnostic to suggest swapping them, analogous to what we do for mut let.

@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2023

r? @TaKO8Ki

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added 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 Nov 27, 2023
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@TaKO8Ki TaKO8Ki left a comment

Choose a reason for hiding this comment

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

After fixing CI errors, r=me

@TaKO8Ki
Copy link
Member

TaKO8Ki commented Nov 27, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 27, 2023

📌 Commit f4c2bde has been approved by TaKO8Ki

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 Nov 27, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 27, 2023
Rollup of 4 pull requests

Successful merges:

 - rust-lang#118095 (Enable the Arm Cortex-A53 errata mitigation on aarch64-unknown-none)
 - rust-lang#118340 (Use helper functions in `pretty.rs` instead of accessing the `Cell`s manually)
 - rust-lang#118358 (make const tests independent of std debug assertions)
 - rust-lang#118359 (Suggest swapping the order of `ref` and `box`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 215d84a into rust-lang:master Nov 27, 2023
11 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 27, 2023
Rollup merge of rust-lang#118359 - hkmatsumoto:suggest-box-ref, r=TaKO8Ki

Suggest swapping the order of `ref` and `box`

It is not valid grammar to write `ref box <ident>` in patterns, but `box ref <ident>` is.
This patch adds a diagnostic to suggest swapping them, analogous to what we do for `mut let`.
@rustbot rustbot added this to the 1.76.0 milestone Nov 27, 2023
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.

None yet

5 participants