Rust tool/IDE with "extract function" refactoring?


#1

I’m doing a bit of refactoring and I’d love to have an ‘extract function’ helper that would take some lines of code from an existing function, move them to a separate function, and replace original with a call to that function.
I’m spoiled by the type inference, and doing this by hand requires typing out all the types involved in full.

Does such tool exist for Rust yet?


#2

I know about such plans for intellij idea: https://github.com/intellij-rust/intellij-rust/issues/424
but as I know it is not implemented yet.


#3

Even doing Cut (not Copy) and Paste from module to module
requires a lot of work (if you use use in previous module and new module
missed these stuff). So extract function is far, far dream.

But it would be great to have such refactoring inside rls.