diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-23 15:17:08 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-23 15:17:08 +0000 |
commit | 3d6ec45a010201ad9ae71e2e5553529a03cc0443 (patch) | |
tree | c03cc6d96843fc8fe4abfb62858fa6bbaa337a88 | |
parent | 838ad6bcfb2a82c030e18d019b8a06752f0fc828 (diff) | |
parent | b4970b0fe9c5f4cf43bebabcdbb38da4876d652f (diff) |
Merge #3282
3282: Add suggestion for failed path resolution r=matklad a=yoshuawuyts
This adds https://github.com/rust-analyzer/rust-analyzer/issues/3245 as an inline help text for when path resolution fails. I saw this error, but also `"Failed to read Cargo metadata from Cargo.toml file"` several times while trying to debug what was failing.
There's probably a more structured way of displaying help texts in VS Code popups. But this would've saved me 20 mins of debugging when installing `rust-analyzer` under WSL today. Thanks!
Co-authored-by: Yoshua Wuyts <[email protected]>
-rw-r--r-- | crates/ra_project_model/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs index e35f7fbbc..9df6a0e07 100644 --- a/crates/ra_project_model/src/lib.rs +++ b/crates/ra_project_model/src/lib.rs | |||
@@ -103,7 +103,7 @@ impl ProjectWorkspace { | |||
103 | let sysroot = if with_sysroot { | 103 | let sysroot = if with_sysroot { |
104 | Sysroot::discover(&cargo_toml).with_context(|| { | 104 | Sysroot::discover(&cargo_toml).with_context(|| { |
105 | format!( | 105 | format!( |
106 | "Failed to find sysroot for Cargo.toml file {}", | 106 | "Failed to find sysroot for Cargo.toml file {}. Is rust-src installed?", |
107 | cargo_toml.display() | 107 | cargo_toml.display() |
108 | ) | 108 | ) |
109 | })? | 109 | })? |