Skip to content

Commit c43a115

Browse files
authored
Rollup merge of rust-lang#74353 - pierwill:pierwill-edit-dep-node, r=jonas-schievink
Edit docs for rustc_middle::dep_graph::dep_node Fixes some missing punctuation, and adds a blank line for a more concise summary.
2 parents dceafac + 6a783af commit c43a115

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/librustc_middle/dep_graph/dep_node.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
//! This module defines the `DepNode` type which the compiler uses to represent
2-
//! nodes in the dependency graph. A `DepNode` consists of a `DepKind` (which
2+
//! nodes in the dependency graph.
3+
//!
4+
//! A `DepNode` consists of a `DepKind` (which
35
//! specifies the kind of thing it represents, like a piece of HIR, MIR, etc)
4-
//! and a `Fingerprint`, a 128 bit hash value the exact meaning of which
6+
//! and a `Fingerprint`, a 128-bit hash value the exact meaning of which
57
//! depends on the node's `DepKind`. Together, the kind and the fingerprint
68
//! fully identify a dependency node, even across multiple compilation sessions.
79
//! In other words, the value of the fingerprint does not depend on anything
@@ -11,9 +13,9 @@
1113
//! uniquely identify a given commit and has a few advantages:
1214
//!
1315
//! * A `DepNode` can simply be serialized to disk and loaded in another session
14-
//! without the need to do any "rebasing (like we have to do for Spans and
15-
//! NodeIds) or "retracing" like we had to do for `DefId` in earlier
16-
//! implementations of the dependency graph.
16+
//! without the need to do any "rebasing" (like we have to do for Spans and
17+
//! NodeIds) or "retracing" (like we had to do for `DefId` in earlier
18+
//! implementations of the dependency graph).
1719
//! * A `Fingerprint` is just a bunch of bits, which allows `DepNode` to
1820
//! implement `Copy`, `Sync`, `Send`, `Freeze`, etc.
1921
//! * Since we just have a bit pattern, `DepNode` can be mapped from disk into
@@ -42,7 +44,7 @@
4244
//! `DefId` it was computed from. In other cases, too much information gets
4345
//! lost during fingerprint computation.
4446
//!
45-
//! The `DepConstructor` enum, together with `DepNode::new()` ensures that only
47+
//! The `DepConstructor` enum, together with `DepNode::new()`, ensures that only
4648
//! valid `DepNode` instances can be constructed. For example, the API does not
4749
//! allow for constructing parameterless `DepNode`s with anything other
4850
//! than a zeroed out fingerprint. More generally speaking, it relieves the

0 commit comments

Comments
 (0)