rust-analyzer
rust-analyzer copied to clipboard
Fix: Handle Self replacement contextually in inline assists
Only replace Self when inlining across different impl contexts, and use bare type names for expression contexts to avoid turbofish issues.
Fixes rust-lang/rust-analyzer#19827
Thanks @Veykril for the feedback, I think it does make sense that we should leverage and extend the existing PathTransform mechanism that's already used for generic argument rewriting. I have updated the patch based on your review.