Skip to content

Commit

Permalink
Auto merge of #15887 - jinohkang-theori:fix/ide-assists/convert_tuple…
Browse files Browse the repository at this point in the history
…_struct_to_named_struct/handle_refs_inside_macro_invocations, r=Veykril

Fix incorrectly replacing references in macro invocation in "Convert to named struct" assist

Fixes #15630.

Complements #13647 (same assist but missed this one), #14920 (inverse action assist).
  • Loading branch information
bors committed Dec 13, 2023
2 parents f81bd0c + 0beba7c commit dd07f1f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ fn edit_field_references(
edit.edit_file(file_id);
for r in refs {
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());
}
}
}
Expand Down

0 comments on commit dd07f1f

Please sign in to comment.