Skip to content

Commit

Permalink
doc(fingerprint): more docs and intra-doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Feb 2, 2023
1 parent efd3733 commit 2d57220
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 70 deletions.
10 changes: 10 additions & 0 deletions src/cargo/core/compiler/crate_type.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
use std::fmt;

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

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

0 comments on commit 2d57220

Please sign in to comment.