Rust tool/IDE with "extract function" refactoring?

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?

1 Like

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.

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.

1 Like