diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2025-05-05 15:06:16 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-05 15:06:16 +0000 |
| commit | 2e7b86d4b66b6c6a1ea39b1ccb97015424553979 (patch) | |
| tree | f8bff7dcc3bf41b868bc6843db3d6a7408cb3e29 | |
| parent | b41d379429541f8e335b49b57de389dd7a06c0da (diff) | |
| parent | c3bdb24764ce91e04b0321382cd0af5ed2a387b5 (diff) | |
| download | rust-2e7b86d4b66b6c6a1ea39b1ccb97015424553979.tar.gz rust-2e7b86d4b66b6c6a1ea39b1ccb97015424553979.zip | |
Merge pull request #19750 from Veykril/push-zvvsopwxovrn
fix: Remove unnecessary token length check for macros in renaming
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide-db/src/rename.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/tools/rust-analyzer/crates/ide-db/src/rename.rs b/src/tools/rust-analyzer/crates/ide-db/src/rename.rs index b8119e1aab3..fa2a46a0f7c 100644 --- a/src/tools/rust-analyzer/crates/ide-db/src/rename.rs +++ b/src/tools/rust-analyzer/crates/ide-db/src/rename.rs @@ -390,11 +390,6 @@ pub fn source_edit_from_references( let mut edited_ranges = Vec::new(); for &FileReference { range, ref name, .. } in references { let name_range = name.text_range(); - if name_range.len() != range.len() { - // This usage comes from a different token kind that was downmapped to a NameLike in a macro - // Renaming this will most likely break things syntax-wise - continue; - } let has_emitted_edit = match name { // if the ranges differ then the node is inside a macro call, we can't really attempt // to make special rewrites like shorthand syntax and such, so just rename the node in |
