Skip to content

fix: suggest 'fmt' when user types 'cargo rustfmt'#16985

Merged
weihanglo merged 2 commits into
rust-lang:masterfrom
raushan728:Fix-12887
May 10, 2026
Merged

fix: suggest 'fmt' when user types 'cargo rustfmt'#16985
weihanglo merged 2 commits into
rust-lang:masterfrom
raushan728:Fix-12887

Conversation

@raushan728
Copy link
Copy Markdown
Contributor

Adds a direct suggestion for fmt when a user accidentally types cargo rustfmt. This bypasses the default edit-distance calculation which incorrectly suggested rustc.

Fixes #12887

@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 10, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 10, 2026

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, epage, weihanglo

Copy link
Copy Markdown
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks!

View changes since this review

@weihanglo weihanglo enabled auto-merge May 10, 2026 16:32
@weihanglo weihanglo added this pull request to the merge queue May 10, 2026
Merged via the queue into rust-lang:master with commit 7adc098 May 10, 2026
56 of 58 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 10, 2026
@raushan728 raushan728 deleted the Fix-12887 branch May 11, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area: Command-line interface, option parsing, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo rustfmt suggest rustc and not fmt

3 participants