Skip to main content

semantic_diagnostics

Function semantic_diagnostics 

Source
pub fn semantic_diagnostics(
    uri: &Url,
    doc: &ParsedDoc,
    session: &AnalysisSession,
    cfg: &DiagnosticsConfig,
) -> Vec<Diagnostic>
Expand description

Run semantic checks on doc against the supplied AnalysisSession.

Replaces the legacy MirDb-mutating path (pre mir 0.22). The session owns the workspace MirDb internally; this function ingests the current file, runs Pass 2 via FileAnalyzer, and returns LSP diagnostics filtered by DiagnosticsConfig.