Skip to content

Fix incorrect typo suggestion for struct field shorthands - #163370

Merged
rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
raushan728:issues/163324
Sep 29, 2026
Merged

rust-bors[bot] merged 2 commits into
rust-lang:mainfrom
raushan728:issues/163324

Conversation

@raushan728

@raushan728 raushan728 commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #163324

by passing the field Ident to the suggestion builder to correctly expand unresolved struct shorthands.

r? @maxdexh

@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 Sep 26, 2026
@rustbot

rustbot commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

Error: Failed to set assignee to maxdexh: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

@raushan728

Copy link
Copy Markdown
Contributor Author

cc @maxdexh
r? @GuillaumeGomez

@rust-log-analyzer

This comment has been minimized.

@rustbot

This comment has been minimized.

Comment thread tests/ui/structs/struct-fields-shorthand-unresolved.stderr
Comment thread tests/ui/resolve/struct-shorthand-typo.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
Member

Just one nit but otherwise looks good to me.

@GuillaumeGomez

Copy link
Copy Markdown
Member

r=me once CI pass.

@bors delegate+

@rust-bors

rust-bors Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

✌️ @raushan728, you can now approve this pull request!

If @GuillaumeGomez told you to "r=me" after making some further change, then please make that change and post @bors r=GuillaumeGomez.

View changes since this delegation.

@raushan728

Copy link
Copy Markdown
Contributor Author

Hi @GuillaumeGomez could you please also help me here #162749 ? thanks!

Taking out a little time

@GuillaumeGomez

Copy link
Copy Markdown
Member

There is already someone assigned who's reviewing, so just a bit of patience.

Comment thread tests/ui/resolve/struct-shorthand-typo.rs
@rustbot

rustbot commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@chenyukang

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit ac14be7 has been tentatively approved by chenyukang

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot 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 Sep 29, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 29, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #163024 (Add `Dir` equivalents of `fs::metadata` & `fs::symlink_metadata`)
 - #162839 (Bump min Emscripten version to 4.0, drop deprecated -sWASM_BIGINT for wasm32-unknown-emscripten)
 - #163370 (Fix incorrect typo suggestion for `struct field` shorthands)
 - #163471 (do not suggest capturing `'_` twice in `use<...>` for E0700)
@rust-bors
rust-bors Bot merged commit dd4bda9 into rust-lang:main Sep 29, 2026
13 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Sep 29, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 29, 2026
Rollup merge of #163370 - raushan728:issues/163324, r=chenyukang

Fix incorrect typo suggestion for `struct field` shorthands

Fixes #163324

by passing the field `Ident` to the suggestion builder to correctly expand unresolved struct shorthands.

r? @maxdexh
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Sep 30, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#163024 (Add `Dir` equivalents of `fs::metadata` & `fs::symlink_metadata`)
 - rust-lang/rust#162839 (Bump min Emscripten version to 4.0, drop deprecated -sWASM_BIGINT for wasm32-unknown-emscripten)
 - rust-lang/rust#163370 (Fix incorrect typo suggestion for `struct field` shorthands)
 - rust-lang/rust#163471 (do not suggest capturing `'_` twice in `use<...>` for E0700)
@raushan728
raushan728 deleted the issues/163324 branch September 30, 2026 08:36
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.

Incorrect suggestion for "a constant with a similar name exists"

5 participants