Use --workspace when loading extern resources

https://github.com/rust-analyzer/rust-analyzer/issues/5040#issuecomment-759853153
This commit is contained in:
Chinedu Francis Nwafili 2021-01-14 06:03:41 -05:00 committed by GitHub
parent d635806ea5
commit 47c5ec4b94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -377,7 +377,7 @@ pub(crate) fn load_extern_resources(
progress: &dyn Fn(String),
) -> Result<ExternResources> {
let mut cmd = Command::new(toolchain::cargo());
cmd.args(&["check", "--message-format=json", "--manifest-path"]).arg(cargo_toml);
cmd.args(&["check", "--workspace", "--message-format=json", "--manifest-path"]).arg(cargo_toml);
// --all-targets includes tests, benches and examples in addition to the
// default lib and bins. This is an independent concept from the --targets