mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
Improve proc-macro panic message and workspace loading failure diagnostic
This commit is contained in:
parent
f854e19ef0
commit
ada65feaa1
3 changed files with 4 additions and 3 deletions
|
@ -19,9 +19,10 @@ rowan.opt-level = 3
|
|||
rustc-hash.opt-level = 3
|
||||
smol_str.opt-level = 3
|
||||
text-size.opt-level = 3
|
||||
serde.opt-level = 3
|
||||
salsa.opt-level = 3
|
||||
# This speeds up `cargo xtask dist`.
|
||||
miniz_oxide.opt-level = 3
|
||||
salsa.opt-level = 3
|
||||
|
||||
[profile.release]
|
||||
incremental = true
|
||||
|
|
|
@ -192,7 +192,7 @@ impl ExpandErrorKind {
|
|||
("overflow expanding the original macro".to_owned(), true)
|
||||
}
|
||||
ExpandErrorKind::Other(e) => ((**e).to_owned(), true),
|
||||
ExpandErrorKind::ProcMacroPanic(e) => ((**e).to_owned(), true),
|
||||
ExpandErrorKind::ProcMacroPanic(e) => (format!("proc-macro panicked: {e}"), true),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ impl GlobalState {
|
|||
status.health |= lsp_ext::Health::Warning;
|
||||
format_to!(
|
||||
message,
|
||||
"Workspace `{}` has been queried without dependencies, connecting to crates.io might have failed.\n\n",
|
||||
"Failed to read Cargo metadata for `{}`, the `Cargo.toml` might be invalid or you have no internet connection.\n\n",
|
||||
ws.manifest_or_root()
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue