]> git.lizzy.rs Git - rust.git/commitdiff
Use --workspace when loading extern resources
authorChinedu Francis Nwafili <frankie.nwafili@gmail.com>
Thu, 14 Jan 2021 11:03:41 +0000 (06:03 -0500)
committerGitHub <noreply@github.com>
Thu, 14 Jan 2021 11:03:41 +0000 (06:03 -0500)
https://github.com/rust-analyzer/rust-analyzer/issues/5040#issuecomment-759853153

crates/project_model/src/cargo_workspace.rs

index 2ee4e88b2e0003b94dc085250cf8264e51eef5f3..a1ab9c6db57290c3a76971e26991d9793c5f18eb 100644 (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