Skip to main content

find_compound_cycle

Function find_compound_cycle 

Source
pub(crate) fn find_compound_cycle(
    krate: CrateNum,
    start: &str,
) -> Option<Vec<String>>
Expand description

Return a cycle path (e.g. ["A", "B", "A"]) if expanding start can reach itself again through compound-to-compound references, None otherwise.

Only edges that resolve to another registered compound are followed; calls to primitives (Allocated, Align, …) terminate the walk. The crate’s own compounds are overlaid on the builtin namespace.