RustRover
 
Get RustRover

Code completion

Last modified: 31 October 2024

Auto-completion for your Rust code works as you type. You can also call it manually by pressing CtrlSpace.

For example, completion is available for attributes and elements inside #[derive], including standard library traits:

https://resources.jetbrains.com/help/img/idea/2024.3/ri_completion_derive.png
Gif

For popular Rust crates, you will receive suggestions even if the crate hasn’t been added to dependencies:

Completion for items from popular crates not included in dependencies

Completion also works inside macro calls. The plugin knows the resulting macro substitution and suggests only the applicable items:

Completion for macro calls

Note that completion is available in doctest comments as well:

Completion in doctest comments