about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-02 10:53:35 +0000
committerbors <bors@rust-lang.org>2024-01-02 10:53:35 +0000
commit306defaef495eff0f445b8a922e6e155dfb50e4e (patch)
tree627aac3f5f703d0a9512bc9feba53da33350cbaf /tests/codegen/src-hash-algorithm
parent792c94621d7d394fc631231f93f0cee55ffd00a4 (diff)
parent38b5dcb53c33f7852071b4744919279a7970f1c5 (diff)
downloadrust-306defaef495eff0f445b8a922e6e155dfb50e4e.tar.gz
rust-306defaef495eff0f445b8a922e6e155dfb50e4e.zip
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.
Diffstat (limited to 'tests/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions