about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-13 18:50:38 +0000
committerbors <bors@rust-lang.org>2022-08-13 18:50:38 +0000
commit010f68cacfdddcc50234b54965e1326d7ad925ab (patch)
tree971dc610e4fc9bfb189e814f88fa35572bc57771
parentbbe5637bbf0f6dcdc62062f7d50a3947026be9f9 (diff)
parent614969baa770360b711881a3d9776d60937c98db (diff)
downloadrust-010f68cacfdddcc50234b54965e1326d7ad925ab.tar.gz
rust-010f68cacfdddcc50234b54965e1326d7ad925ab.zip
Auto merge of #13017 - Veykril:vscode-diag-workaround, r=Veykril
Pad empty diagnostic messages in relatedInformation as well

Follw up to https://github.com/rust-lang/rust-analyzer/pull/13016
-rw-r--r--editors/code/src/client.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index 40ba17844be..27ab31db8db 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -111,6 +111,13 @@ export async function createClient(
                     if (!diagnostic.message) {
                         diagnostic.message = " ";
                     }
+                    if (diagnostic.relatedInformation) {
+                        for (const relatedInformation of diagnostic.relatedInformation) {
+                            if (!relatedInformation.message) {
+                                relatedInformation.message = " ";
+                            }
+                        }
+                    }
                 }
                 next(uri, diagnostics);
             },