@@ -543,23 +543,23 @@ struct DepFingerprint {
543
543
/// recompiled. Inputs to the fingerprint include source code modifications,
544
544
/// compiler flags, compiler version, etc. This structure is not simply a
545
545
/// `String` due to the fact that some fingerprints cannot be calculated lazily.
546
- /// 如果指纹发生变化,则需要重新编译包本身;指纹的输入包括:代码修改、编译器标志、编译器版本;
547
546
///
548
547
/// Path sources, for example, use the mtime of the corresponding dep-info file
549
548
/// as a fingerprint (all source files must be modified *before* this mtime).
550
549
/// This dep-info file is not generated, however, until after the crate is
551
550
/// compiled. As a result, this structure can be thought of as a fingerprint
552
- /// to-be. The actual value can be calculated via `hash_u64()`, but the operation
551
+ /// to-be. The actual value can be calculated via [ `hash_u64()`] , but the operation
553
552
/// may fail as some files may not have been generated.
554
553
///
555
554
/// Note that dependencies are taken into account for fingerprints because rustc
556
555
/// requires that whenever an upstream crate is recompiled that all downstream
557
556
/// dependents are also recompiled. This is typically tracked through
558
- /// `DependencyQueue`, but it also needs to be retained here because Cargo can
559
- /// be interrupted while executing, losing the state of the `DependencyQueue`
557
+ /// [ `DependencyQueue`] , but it also needs to be retained here because Cargo can
558
+ /// be interrupted while executing, losing the state of the [ `DependencyQueue`]
560
559
/// graph.
561
- /// 上游包重新编译的时候,所有下游依赖项也会重新编译。
562
- /// 通过DependencyQueue进行跟踪,但也需要保留在这里,因为 Cargo 在执行时可能会被中断,从而丢失“DependencyQueue”图的状态。
560
+ ///
561
+ /// [`hash_u64()`]: crate::core::compiler::fingerprint::Fingerprint::hash_u64
562
+ /// [`DependencyQueue`]: crate::util::DependencyQueue
563
563
#[ derive( Serialize , Deserialize ) ]
564
564
pub struct Fingerprint {
565
565
/// Hash of the version of `rustc` used.
0 commit comments