3 ms·
Is there any tool in Rust that allows auto import module based on usage ? A VSCode extension is perfect.
by revskill 4y ago
Is there any tool in Rust that allows auto import module based on usage ? A VSCode extension is perfect.
- d12bb 4y agoRust Analyzer can add `use` statements on confirming completion and clippy will complain/remove unused ones, if that's what you want.
- bobbylarrybobby 4y agoWhen 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.