Skip to main content

unit_reference_spans

Function unit_reference_spans 

Source
pub(crate) fn unit_reference_spans(source: &str) -> Vec<(String, Span)>
Expand description

Slice 6b: the (unit name, name span) of every uses/consumes target in the source — the clickable ranges for document links. The link’s target file is resolved by the handler through the unit→source map (ADR 0095); this only finds the spans, so it works on the live buffer regardless of the map.