]> git.proxmox.com Git - cargo.git/commitdiff
Add comment explaining dep_kind in compute_deps_custom_build.
authorEric Huss <eric@huss.org>
Sat, 1 Feb 2020 23:20:24 +0000 (15:20 -0800)
committerEric Huss <eric@huss.org>
Thu, 20 Feb 2020 20:04:28 +0000 (12:04 -0800)
src/cargo/core/compiler/unit_dependencies.rs

index dde9a2840789875c5c5604fe40b57de0d9622d6a..9ea46bc1f08c4a8c8332457f4cae9e7e8ee598f7 100644 (file)
@@ -382,6 +382,11 @@ fn compute_deps<'a, 'cfg>(
 ///
 /// The `unit` provided must represent an execution of a build script, and
 /// the returned set of units must all be run before `unit` is run.
+///
+/// `dep_kind` is the dependency kind of the package this build script is
+/// being built for. This ensures that the build script is built with the same
+/// features the package is built with (if the build script has cfg!()
+/// checks).
 fn compute_deps_custom_build<'a, 'cfg>(
     unit: &Unit<'a>,
     dep_kind: DepKind,