fn display_to_diagnostic<E>(
    range: lsp::Range,
    error: E,
    severity: lsp::DiagnosticSeverity,
) -> lsp::Diagnostic
where
    E: fmt::Display,
{
    lsp::Diagnostic {
        range,
        severity: Some(severity),
        code: None,
        code_description: None,
        source: None,
        message: error.to_string(),
        related_information: None,
        tags: None,
        data: None,
    }
}
/// Convert a span and something displayeable into diagnostics.
Convert a span and something displayeable into diagnostics.
Convert a span and something displayeable into diagnostics .
fn display_to_diagnostic<E>(
    range: lsp::Range,
    error: E,
    severity: lsp::DiagnosticSeverity,
) -> lsp::Diagnostic
where
    E: fmt::Display,
{
    lsp::Diagnostic {
        range,
        severity: Some(severity),
        code: None,
        code_description: None,
        source: None,
        message: error.to_string(),
        related_information: None,
        tags: None,
        data: None,
    }
}
fn display_to_diagnostic < E > ( range : lsp :: Range , error : E , severity : lsp :: DiagnosticSeverity , ) -> lsp :: Diagnostic where E : fmt :: Display , { lsp :: Diagnostic { range , severity : Some ( severity ) , code : None , code_description : None , source : None , message : error . to_string ( ) , related_information : None , tags : None , data : None , } }
Convert a span and something displayeable into diagnostics.
Convert a span and something displayeable into diagnostics .
range
lsp::Range
error
E
severity
lsp::DiagnosticSeverity
range
lsp::Range
error
E
severity
lsp::DiagnosticSeverity