Function toposort

Source
fn toposort<T>(
    defns: &[(FluxLocalDefId, Binder<Expr>, T)],
) -> Result<Vec<usize>, Vec<FluxLocalDefId>>
Expand description

Returns

  • either Ok(d1…dn) which are topologically sorted such that forall i < j, di does not depend on i.e. “call” dj
  • or Err(d1…dn) where d1 ‘calls’ d2 ‘calls’ … ‘calls’ dn ‘calls’ d1