Trying to rename "use alias" in VSCode messes up with files from other crates #5198
Labels
A-ide
general IDE features
C-bug
Category: bug
E-unknown
It's unclear if the issue is E-hard or E-easy without digging in
S-actionable
Someone could pick this issue up and work on it right now
Hello. I'm not sure what is the "official" name of the renaming imports construct in Rust, so I'm referring to it as "use alias" both in the title and in the body of this issue. Fell free to fix this and delete this part, please.
What is wrong?
When trying to rename the "alias" part of the "use alias" using the Rename Symbol functionality from VSCode (F2), the original name is the one that gets replaced. Moreover, it seems that the change is applied to every source file that uses the previous original name as a
mod
name in every crate we depend on.What should happen instead?
I expected that only the new name and its corresponding usages in the current file be changed.
MWE
main.rs
Cargo.toml
Just the most basic
Steps taken
foo
"alias"bar
"4.1. A lot of files get opened by VSCode, none of them from our crate
4.2 All of the opened files have changes relating to the renaming we tried to do
System info
The text was updated successfully, but these errors were encountered: