about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/graph/scc/mod.rs
diff options
context:
space:
mode:
authorAmanda Stjerna <amanda.stjerna@it.uu.se>2024-05-13 14:02:14 +0200
committerAmanda Stjerna <amanda.stjerna@it.uu.se>2024-06-12 15:47:32 +0200
commitd2a01760bcc82302464632e38d2108e06c2a8dd9 (patch)
tree3512424565f8993b81d7ec598d7c11bc20844afb /compiler/rustc_data_structures/src/graph/scc/mod.rs
parentb1ace388c0c493e01b9ee1295dea406588afda11 (diff)
downloadrust-d2a01760bcc82302464632e38d2108e06c2a8dd9.tar.gz
rust-d2a01760bcc82302464632e38d2108e06c2a8dd9.zip
Documentation fixes
Diffstat (limited to 'compiler/rustc_data_structures/src/graph/scc/mod.rs')
-rw-r--r--compiler/rustc_data_structures/src/graph/scc/mod.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/compiler/rustc_data_structures/src/graph/scc/mod.rs b/compiler/rustc_data_structures/src/graph/scc/mod.rs
index fb8d727d67e..68a055553a1 100644
--- a/compiler/rustc_data_structures/src/graph/scc/mod.rs
+++ b/compiler/rustc_data_structures/src/graph/scc/mod.rs
@@ -250,17 +250,17 @@ enum NodeState<N, S, A> {
     NotVisited,
 
     /// This node is currently being walked as part of our DFS. It is on
-    /// the stack at the depth `depth` and the heaviest node on the way
-    /// there is `max_weigth_on_path`.
+    /// the stack at the depth `depth` and its current annotation is
+    /// `annotation`.
     ///
     /// After SCC construction is complete, this state ought to be
     /// impossible.
     BeingVisited { depth: usize, annotation: A },
 
     /// Indicates that this node is a member of the given cycle where
-    /// the weight of the heaviest node is `cycle_max_weight`.
-    /// Note that an SCC can have several cycles, so the max
-    /// weight of an SCC is the max weight of all its cycles.
+    /// the merged annotation is `annotation`.
+    /// Note that an SCC can have several cycles, so its final annotation
+    /// is the merged value of all its member annotations.
     InCycle { scc_index: S, annotation: A },
 
     /// Indicates that this node is a member of whatever cycle
@@ -304,9 +304,8 @@ where
     /// D' (i.e., D' < D), we know that N, N', and all nodes in
     /// between them on the stack are part of an SCC.
     ///
-    /// Additionally, we keep track of a representative of the SCC with the highest
-    /// reachable weight for all SCCs, for some arbitrary ordering function that assigns
-    /// a weight to nodes.
+    /// Additionally, we keep track of a representative annotation of the
+    /// SCC.
     ///
     /// [wikipedia]: https://bit.ly/2EZIx84
     fn construct(graph: &'c G, to_annotation: F) -> Sccs<G::Node, S, A> {