Skip to main content

build_name_to_page

Function build_name_to_page 

Source
pub fn build_name_to_page(
    gcx: Gcx<'_>,
    root: &Path,
    allowed_sources: &HashSet<PathBuf>,
) -> NameToPage
Expand description

Build the NameToPage index from HIR by re-deriving each item’s output path.

This mirrors the path computation in render::source so links can be resolved before rendering begins.

Only items whose source file is contained in allowed_sources (absolute paths) are included, so cross-references cannot resolve to pages that won’t be emitted.