Fix rust-analyzer error "rustc [E0463]: can't find crate for `test`"
When working in projects that set a custom build-std
value that do
not include the std
crate, rust-analyzer reports the following
error.
rustc [E0463]: can't find crate for `test`
Placing a .dir-locals.el
file in the root directory of the project
with the following contents fixes it.
((nil . ((eglot-workspace-configuration . (:rust-analyzer (:cargo (:allTargets :json-false)))))))