Skip to content

Commit 2d57220

Browse files
committed
doc(fingerprint): more docs and intra-doc links
1 parent efd3733 commit 2d57220

File tree

3 files changed

+117
-70
lines changed

3 files changed

+117
-70
lines changed

src/cargo/core/compiler/crate_type.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
use std::fmt;
22

3+
/// Types of the output artifact that the compiler emits.
4+
/// Usually distributable or linkable either statically or dynamically.
5+
///
6+
/// See <https://doc.rust-lang.org/nightly/reference/linkage.html>.
37
#[derive(Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
48
pub enum CrateType {
59
Bin,
@@ -57,6 +61,12 @@ impl CrateType {
5761
}
5862
}
5963

64+
/// Returns whether production of this crate type requires the object files
65+
/// from dependencies to be available.
66+
///
67+
/// See also [`TargetKind::requires_upstream_objects`].
68+
///
69+
/// [`TargetKind::requires_upstream_objects`]: crate::core::manifest::TargetKind::requires_upstream_objects
6070
pub fn requires_upstream_objects(&self) -> bool {
6171
// "lib" == "rlib" and is a compilation that doesn't actually
6272
// require upstream object files to exist, only upstream metadata

0 commit comments

Comments
 (0)