From 9b5bc788f7495d2a626ece79fecb4cf13311989a Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 21 Mar 2022 12:44:21 -0700 Subject: [PATCH] Update doc string for deps_of/compute_deps. --- src/cargo/core/compiler/unit_dependencies.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cargo/core/compiler/unit_dependencies.rs b/src/cargo/core/compiler/unit_dependencies.rs index a69c2501fbc..c3ad24645c0 100644 --- a/src/cargo/core/compiler/unit_dependencies.rs +++ b/src/cargo/core/compiler/unit_dependencies.rs @@ -226,7 +226,10 @@ fn deps_of_roots(roots: &[Unit], state: &mut State<'_, '_>) -> CargoResult<()> { Ok(()) } -/// Compute the dependencies of a single unit. +/// Compute the dependencies of a single unit, recursively computing all +/// transitive dependencies. +/// +/// The result is stored in `state.unit_dependencies`. fn deps_of(unit: &Unit, state: &mut State<'_, '_>, unit_for: UnitFor) -> CargoResult<()> { // Currently the `unit_dependencies` map does not include `unit_for`. This should // be safe for now. `TestDependency` only exists to clear the `panic` @@ -246,10 +249,7 @@ fn deps_of(unit: &Unit, state: &mut State<'_, '_>, unit_for: UnitFor) -> CargoRe Ok(()) } -/// For a package, returns all targets that are registered as dependencies -/// for that package. -/// This returns a `Vec` of `(Unit, UnitFor)` pairs. The `UnitFor` -/// is the profile type that should be used for dependencies of the unit. +/// Returns the direct unit dependencies for the given `Unit`. fn compute_deps( unit: &Unit, state: &mut State<'_, '_>,