Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there any tool in Rust that allows auto import module based on usage ? A VSCode extension is perfect.


Rust Analyzer can add `use` statements on confirming completion and clippy will complain/remove unused ones, if that's what you want.


When a symbol is unresolved, but could be made available in the current workspace -- e.g., HashMap when you haven't yet imported it, or a trait function whose trait isn't in scope -- rust-analyzer offers to import or qualify the symbol or import the necessary trait.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: