Skip to content

Commit 134aeff

Browse files
committed
Add comment explaining dep_kind in compute_deps_custom_build.
1 parent da678a7 commit 134aeff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cargo/core/compiler/unit_dependencies.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,11 @@ fn compute_deps<'a, 'cfg>(
382382
///
383383
/// The `unit` provided must represent an execution of a build script, and
384384
/// the returned set of units must all be run before `unit` is run.
385+
///
386+
/// `dep_kind` is the dependency kind of the package this build script is
387+
/// being built for. This ensures that the build script is built with the same
388+
/// features the package is built with (if the build script has cfg!()
389+
/// checks).
385390
fn compute_deps_custom_build<'a, 'cfg>(
386391
unit: &Unit<'a>,
387392
dep_kind: DepKind,

0 commit comments

Comments
 (0)