rust/crates/ide-assists
bors 306defaef4 Auto merge of #16114 - roife:fix-inline-with-self-type, r=Veykril
fix: self type replacement in inline-function

Fix #16113, fix #16091

The problem described in this issue actually involves three bugs.

Firstly, when using `ted` to modify the syntax tree, the offset of nodes on the tree changes, which causes the syntax range information from `hir` to become invalid. Therefore, we need to edit the AST after the last usage for `usages_for_locals`.

The second issue is that when inserting nodes, it's necessary to use `clone_subtree` for duplication because the `ted::replace` operation essentially moves a node.

The third issue is that we should use `ancestors_with_macros` instead of `ancestors` to handle impl definition in macros.

I have fixed the three bugs mentioned above and added unit tests.
2024-01-02 10:53:35 +00:00
..
src Auto merge of #16114 - roife:fix-inline-with-self-type, r=Veykril 2024-01-02 10:53:35 +00:00
Cargo.toml internal: Move out WithFixture into dev-dep only crate 2023-12-18 15:24:08 +01:00