Skip to main content

Module semantic_diagnostics

Module semantic_diagnostics 

Source

Functions§

issue_needs_workspace_index
Whether resolving this issue required looking up a symbol (class, function, method, or trait) by name against the workspace-wide symbol table, as opposed to something derivable from the file’s own contents.
issues_to_diagnostics
Convert pre-computed raw issues (from db::semantic::semantic_issues) into LSP diagnostics, applying the user’s DiagnosticsConfig filter. Keeping filter + conversion outside the salsa query preserves memoization across config toggles (the user flipping a category must not rerun the analyzer).
issues_to_diagnostics_gated
Like issues_to_diagnostics, but additionally holds back workspace-symbol-dependent issues (see issue_needs_workspace_index) while index_ready is false. Skips the extra filter/clone pass entirely once ready — the common case, well past server startup — so this costs nothing in steady state.
semantic_diagnostics
Run semantic checks on doc against the supplied AnalysisSession. Ingests the current file through mir’s diagnostics-only path and returns LSP diagnostics filtered by DiagnosticsConfig.