mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Auto merge of #17943 - Veykril:diags, r=Veykril
fix: Improve proc-macro panic message and workspace loading failure diagnostic
This commit is contained in:
commit
9b724459b5
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