rust-lang / rust-lang/rust-analyzer

`try using a conversion method` code action not suggested

Open
#14,546 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

fill match arms is suggested erroneously as a code action, instead of try using a conversion method:

https://user-images.githubusercontent.com/125105/231140194-0c8832a6-8996-42a8-99cb-74fb35a5378b.mp4

In the video Quick fix is first selected via mouse which shows both actions.

Then the keyboard shortcut is pressed (⌘.) and only Fill match arms is shown.

rust-analyzer version: rust-analyzer 0.3.1472-standalone (01120f121 2023-04-07)

rustc version: rustc 1.68.1 (8460ca823 2023-03-20)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in rust-analyzer using the keyboard shortcut (⌘.) and compare it with the mouse-opened Quick Fix list shown in the linked video. Trace how the two code actions are selected or ordered, then verify that the conversion-method action is suggested correctly when the shortcut is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.