The Rust Analyzer optionally takes a meta option “msrv” which allows developers to specify the Rust version their project is using.
msrv is the “Minimum Supported Rust Version”, that is, the version of
rustc compiler being used for the project.
This enables the Analyzers to raise relevant issues in the codebase.
The msrv is specified in the
.deepsource.toml file like this:
[[analyzers]] name = "rust" enabled = true [analyzers.meta] msrv = "1.30.0"
We have now changed the default value from “1.30.0” to “stable” to keep the Analysers synced to the latest stable release of Rust automatically.
This will take away the tedium of having to manually change Rust versions for developers who like to be on the latest stable Rust version.
We also noted a lot of misconfigurations for
msrv meta in the past because of the strict requirement for complete version identifier,
<MAJOR>.<MINOR>.<PATCH> and made changes accordingly to support partial version listings that don’t require
<PATCH> part of the version schema.
This means “1.62.0” can be written as “1.62”, this hence allows flexible matching of versions from the Analyzer side as well. That is, “1.62” is equivalent to any “1.62.1”, “1.62.3”, etc. maximally, allowing much easier setup rules.