Skip to content

Commit 46df704

Browse files
committed
fix: Remove unnecessary token length check for macros in renaming
1 parent fdfa707 commit 46df704

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

crates/ide-db/src/rename.rs

-5
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,6 @@ pub fn source_edit_from_references(
390390
let mut edited_ranges = Vec::new();
391391
for &FileReference { range, ref name, .. } in references {
392392
let name_range = name.text_range();
393-
if name_range.len() != range.len() {
394-
// This usage comes from a different token kind that was downmapped to a NameLike in a macro
395-
// Renaming this will most likely break things syntax-wise
396-
continue;
397-
}
398393
let has_emitted_edit = match name {
399394
// if the ranges differ then the node is inside a macro call, we can't really attempt
400395
// to make special rewrites like shorthand syntax and such, so just rename the node in

0 commit comments

Comments
 (0)