File tree 1 file changed +5
-4
lines changed
crates/rust-analyzer/src/diagnostics
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -462,9 +462,10 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
462
462
message : "original diagnostic" . to_string ( ) ,
463
463
} ;
464
464
for sub in & subdiagnostics {
465
- // Filter out empty/non-existent messages, as they greatly confuse VS Code.
466
- if sub. related . message . is_empty ( ) {
467
- continue ;
465
+ let mut message = sub. related . message . clone ( ) ;
466
+ // Change empty message to " ", as they greatly confuse VS Code.
467
+ if message. is_empty ( ) {
468
+ message = String :: from ( " " ) ;
468
469
}
469
470
diagnostics. push ( MappedRustDiagnostic {
470
471
url : sub. related . location . uri . clone ( ) ,
@@ -475,7 +476,7 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
475
476
code : code. clone ( ) . map ( lsp_types:: NumberOrString :: String ) ,
476
477
code_description : code_description. clone ( ) ,
477
478
source : Some ( source. clone ( ) ) ,
478
- message : sub . related . message . clone ( ) ,
479
+ message,
479
480
related_information : Some ( vec ! [ back_ref. clone( ) ] ) ,
480
481
tags : None , // don't apply modifiers again
481
482
data : None ,
You can’t perform that action at this time.
0 commit comments