diff options
Diffstat (limited to 'crates/ra_project_model')
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs index b50cda06f..0613310f1 100644 --- a/crates/ra_project_model/src/cargo_workspace.rs +++ b/crates/ra_project_model/src/cargo_workspace.rs | |||
@@ -141,6 +141,11 @@ impl CargoWorkspace { | |||
141 | cargo_toml: &Path, | 141 | cargo_toml: &Path, |
142 | cargo_features: &CargoConfig, | 142 | cargo_features: &CargoConfig, |
143 | ) -> Result<CargoWorkspace> { | 143 | ) -> Result<CargoWorkspace> { |
144 | let _ = Command::new(cargo_binary()) | ||
145 | .arg("--version") | ||
146 | .status() | ||
147 | .context("failed to run `cargo --version`, is `cargo` in PATH?")?; | ||
148 | |||
144 | let mut meta = MetadataCommand::new(); | 149 | let mut meta = MetadataCommand::new(); |
145 | meta.manifest_path(cargo_toml); | 150 | meta.manifest_path(cargo_toml); |
146 | if cargo_features.all_features { | 151 | if cargo_features.all_features { |
@@ -303,8 +308,7 @@ pub fn load_extern_resources( | |||
303 | if message.target.kind.contains(&"proc-macro".to_string()) { | 308 | if message.target.kind.contains(&"proc-macro".to_string()) { |
304 | let package_id = message.package_id; | 309 | let package_id = message.package_id; |
305 | // Skip rmeta file | 310 | // Skip rmeta file |
306 | if let Some(filename) = | 311 | if let Some(filename) = message.filenames.iter().find(|name| is_dylib(name)) |
307 | message.filenames.iter().filter(|name| is_dylib(name)).next() | ||
308 | { | 312 | { |
309 | res.proc_dylib_paths.insert(package_id, filename.clone()); | 313 | res.proc_dylib_paths.insert(package_id, filename.clone()); |
310 | } | 314 | } |