rust-lang / rust-lang/rust-analyzer
Update comments that reference refactored symbols
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
In vscode, you can click F2 to rename a module item. In some cases, the module item is referenced with square brackets in one of the comments. For example
// ... some where in your crate
//! This module uses [Builder] to do foo.
// ... else where
struct Builder {
input_path: PathBuf,
output_path: PathBuf
}
Later you decide to refactor Builder, for example, by giving it a more special name. You would want the comments that reference the Builder to be refactored, ideally. It would be nice for Rust-Analyzer to locate and update those references and update them when the code is refactored.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the example in VS Code with Rust Analyzer: rename a module item using F2 when it is referenced in a square-bracketed comment. Define done as updating those comment references alongside the symbol rename, including the shown Builder example; the issue names no source files or tests to inspect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100