rust-lang / rust-lang/rust-analyzer
codeaction: loop label
Open
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
Renaming of loop-labels seems not to work correctly for me rn. The loop-label gets not renamed in the loop itself, but the label on the loop does just fine, when invoking the codeaction from inside the loop.
rust-analyzer version: 2026-06-01
rustc version: 1.98.0-nightly (c1b22f44c 2026-06-17)
editor or extension: NeoVim; rust-analyzer installed via Mason
code snippet to reproduce:
'testlabel: for x in xes.iter() { // codeaction-rename on 'testlabel' does not rename 'testlabel' in the loop
if x == 5 {
continue 'testlabel; // codeaction-rename on 'testlabel' DOES rename 'testlabel' on the outer loop
}
println!("{x");
}
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.
Assessment
This issue has not been assessed yet.