mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +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
|
rustc-hash.opt-level = 3
|
||||||
smol_str.opt-level = 3
|
smol_str.opt-level = 3
|
||||||
text-size.opt-level = 3
|
text-size.opt-level = 3
|
||||||
|
serde.opt-level = 3
|
||||||
|
salsa.opt-level = 3
|
||||||
# This speeds up `cargo xtask dist`.
|
# This speeds up `cargo xtask dist`.
|
||||||
miniz_oxide.opt-level = 3
|
miniz_oxide.opt-level = 3
|
||||||
salsa.opt-level = 3
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
incremental = true
|
incremental = true
|
||||||
|
|
|
@ -192,7 +192,7 @@ impl ExpandErrorKind {
|
||||||
("overflow expanding the original macro".to_owned(), true)
|
("overflow expanding the original macro".to_owned(), true)
|
||||||
}
|
}
|
||||||
ExpandErrorKind::Other(e) => ((**e).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;
|
status.health |= lsp_ext::Health::Warning;
|
||||||
format_to!(
|
format_to!(
|
||||||
message,
|
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()
|
ws.manifest_or_root()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue