Skip to main content

analyze_root

Function analyze_root 

Source
pub fn analyze_root<F>(
    root: WorkspaceFile,
    workspace_root: Option<&Path>,
    preview_features: &PreviewFeatures,
    target: &Target,
    open_text: F,
) -> AnalysisResult
where F: FnMut(&Path) -> Option<String>,
Expand description

Analyze a single root file plus its transitively-@import-reachable closure. Builds the closure (open-buffer text wins over disk), runs the frontend, and returns per-file diagnostics with an optional Snapshot when sema completed.