about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/tools/rust-analyzer/Cargo.toml3
-rw-r--r--src/tools/rust-analyzer/crates/hir-expand/src/lib.rs2
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/Cargo.toml
index d8f9b2b7f6a..aa7bd2dc5fe 100644
--- a/src/tools/rust-analyzer/Cargo.toml
+++ b/src/tools/rust-analyzer/Cargo.toml
@@ -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
diff --git a/src/tools/rust-analyzer/crates/hir-expand/src/lib.rs b/src/tools/rust-analyzer/crates/hir-expand/src/lib.rs
index 741c2b2ebfe..19c3c9c43f1 100644
--- a/src/tools/rust-analyzer/crates/hir-expand/src/lib.rs
+++ b/src/tools/rust-analyzer/crates/hir-expand/src/lib.rs
@@ -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),
         }
     }
 }
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs
index 4a2a400f44c..5d0c6b65992 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs
@@ -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()
                     );
                 }