pub(crate) fn map_rust_diagnostic_to_lsp(
config: &DiagnosticsMapConfig,
_: Diagnostic,
workspace_root: &AbsPath,
snap: &GlobalStateSnapshot,
) -> Vec<MappedRustDiagnostic>Expand description
Converts a Rust root diagnostic to LSP form
This flattens the Rust diagnostic by:
- Creating a LSP diagnostic with the root message and primary span.
- Adding any labelled secondary spans to
relatedInformation - Categorising child diagnostics as either
SuggestedFixes,relatedInformationor additional message lines.
If the diagnostic has no primary span this will return None