Skip to main content

hover_info_with_maps

Function hover_info_with_maps 

Source
pub fn hover_info_with_maps(
    source: &str,
    doc: &ParsedDoc,
    analysis: Option<&FileAnalysis>,
    position: Position,
    other_docs: &[(Url, Arc<ParsedDoc>)],
    other_maps: &[(Url, Arc<SymbolMap>)],
    session: Option<&AnalysisSession>,
    find_class_doc: Option<ClassDocLookup<'_>>,
) -> Option<Hover>
Expand description

Indexed variant: uses pre-computed SymbolMaps for the cross-file declaration lookup (path 4/5), eliminating repeated AST walks on stable files. find_class_doc gives mir-member hover and static-prop hover (path 2/3) the same O(1) workspace-index fast path, falling back to a linear other_docs scan only when it misses (index not ready, unsaved file, …). Named-arg hover still walks other_docs directly — it has no single resolved class to key a fast lookup on.