Function cargo::ops::cargo_compile::traverse_and_share
source · fn traverse_and_share(
interner: &UnitInterner,
memo: &mut HashMap<Unit, Unit>,
new_graph: &mut UnitGraph,
unit_graph: &UnitGraph,
unit: &Unit,
unit_is_for_host: bool,
to_host: Option<CompileKind>
) -> Unit
Expand description
Recursive function for rebuilding the graph.
This walks unit_graph
, starting at the given unit
. It inserts the new
units into new_graph
, and returns a new updated version of the given
unit (dep_hash
is filled in, and kind
switched if necessary).