mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-29 14:33:29 +00:00
fix: Fix incorrectly replacing references in macro invocation in "Convert to named struct" assist
This commit is contained in:
parent
416e9c856a
commit
0beba7cfc4
1 changed files with 1 additions and 1 deletions
|
@ -216,7 +216,7 @@ fn edit_field_references(
|
||||||
edit.edit_file(file_id);
|
edit.edit_file(file_id);
|
||||||
for r in refs {
|
for r in refs {
|
||||||
if let Some(name_ref) = r.name.as_name_ref() {
|
if let Some(name_ref) = r.name.as_name_ref() {
|
||||||
edit.replace(name_ref.syntax().text_range(), name.text());
|
edit.replace(ctx.sema.original_range(name_ref.syntax()).range, name.text());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue