External Publication
Visit Post

Optional features are part of the crate — the project should say so

Rust Internals [Unofficial] March 11, 2026
Source

You can add something like in your Cargo.toml

[dev-dependencies]
mycrate = { path = ".", features = ["stuff", "disabled", "by", "default"] }

and rust-analyzer picks those features. You'll probably need them enabled anyway if you want to add any tests.

Also configuration for rust-analyzer can go not only into editor specific files but also into rust-analyzer.toml sitting in a project root - doc mentions that the support is somewhat spotty though. I imagine they would take a pull request adding some support that is missing.

Discussion in the ATmosphere

Loading comments...