Skip to main content

module_diagnostics

Function module_diagnostics 

Source
pub fn module_diagnostics(
    files: &[(FileId, &HirFile)],
    index: &SymbolIndex,
    resolutions: &ResolutionMap,
) -> Vec<Diagnostic>
Expand description

The M-2 module import + visibility checks (docs/modules-spec.md §2/§4/§7): import well-formedness and cross-module #@private reference enforcement. Purely additive — every trigger needs an IMPORT/#@private/#@public construct absent from the pre-modules world, so the oracle/tier1 corpus is untouched. Genuinely whole-project (reads every file’s HIR plus the project-wide resolutions to walk cross-module references), so it stays a whole-project pass in brink-db’s decomposed whole_project_diagnostics_query rather than gaining a per-file split here (issue #750 / FG-3 completion rebase note; a per-file slice is possible FG-4-era work if module churn is ever hot).