Working with TOML files
RustRover provides extensive support of the TOML format. Find an overview of the main features below.
Highlighting and code style
The highlighting and code style settings are applied to .toml files automatically. You can adjust the settings in and .
Code reference information
In Cargo.toml
, you will see special hints alongside crate versions. These hints indicate the crate's version currently recorded in Cargo.lock
as well as latest one (if available).
Code completion
Code completion works for most manifest keys as well as Cargo features. You can also autocomplete local dependency paths and navigate to the source via click:
When specifying dependencies from crates.io, you can autocomplete their names and versions:
Enabling and disabling features
The IDE provides a dedicated UI for enabling/disabling Cargo workspace features. It also allows you to specify the target architecture, automatically filtering the appropriate workspace features.
For more information, refer to Support for conditional compilation.
Navigation
You can navigate across Cargo features and jump to feature declarations from cfg
and cfg_attr
attributes:
Inspections
The IDE runs a number of inspections to verify Cargo.toml
. For example, it checks whether the referenced crates exist and whether their versions are up-to-date. It also detects any cyclic feature dependencies.
Most problems can be fixed in one click – press Alt+Enter to view the options:
To view the full list of Cargo.toml
inspections, go to and expand the node:
You can also find inspection descriptions on Inspectopedia.
View crate documentation
You will see a gutter icon next to each extern crate declaration – you can use it to quickly open the crate's description on docs.rs in your browser: