Skip to main content

find_def_cycle

Function find_def_cycle 

Source
pub fn find_def_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 def-to-def references, None otherwise.

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