From: Matt Brubeck Date: Wed, 24 Jan 2018 20:37:19 +0000 (-0800) Subject: cargo doc: Generate metadata instead of compiling dependencies X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~3^2~14^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=17a76b8c15f2579e9162320c0e27b7619e9fc86a;p=cargo.git cargo doc: Generate metadata instead of compiling dependencies --- diff --git a/src/cargo/ops/cargo_rustc/context.rs b/src/cargo/ops/cargo_rustc/context.rs index f9c0cec87..da22f57ed 100644 --- a/src/cargo/ops/cargo_rustc/context.rs +++ b/src/cargo/ops/cargo_rustc/context.rs @@ -940,7 +940,7 @@ impl<'a, 'cfg> Context<'a, 'cfg> { ret.push(Unit { pkg: dep, target: lib, - profile: self.lib_profile(), + profile: self.lib_or_check_profile(unit, lib), kind: unit.kind.for_target(lib), }); if self.build_config.doc_all { @@ -1057,6 +1057,9 @@ impl<'a, 'cfg> Context<'a, 'cfg> { pub fn lib_or_check_profile(&self, unit: &Unit, target: &Target) -> &'a Profile { if unit.profile.check && !target.is_custom_build() && !target.for_host() { &self.profiles.check + } else if unit.profile.doc && !unit.profile.test && + !target.is_custom_build() && !target.for_host() { + &self.profiles.check } else { self.lib_profile() }