aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-11 00:39:06 +0100
committerAleksey Kladov <[email protected]>2020-07-11 00:39:06 +0100
commite6ea395fb0635dbe206d7004fb720dd84516bc4f (patch)
tree7986dee8ec73d21f624822530b0224681ab61806
parenta36ff4a100c2c321eec898f2cfee25c0be85ffc6 (diff)
Don't show error when speculatively reloading workspace
-rw-r--r--crates/rust-analyzer/src/reload.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs
index 4e7d5be79..ab1b18ea9 100644
--- a/crates/rust-analyzer/src/reload.rs
+++ b/crates/rust-analyzer/src/reload.rs
@@ -126,10 +126,12 @@ impl GlobalState {
126 res.map_err(|err| { 126 res.map_err(|err| {
127 has_errors = true; 127 has_errors = true;
128 log::error!("failed to load workspace: {:#}", err); 128 log::error!("failed to load workspace: {:#}", err);
129 self.show_message( 129 if self.workspaces.is_empty() {
130 lsp_types::MessageType::Error, 130 self.show_message(
131 format!("rust-analyzer failed to load workspace: {:#}", err), 131 lsp_types::MessageType::Error,
132 ); 132 format!("rust-analyzer failed to load workspace: {:#}", err),
133 );
134 }
133 }) 135 })
134 .ok() 136 .ok()
135 }) 137 })