diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2025-04-22 04:36:58 +0200 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2025-05-01 10:20:34 +0200 |
| commit | c43a6f05d6cedbb6a191e0c307cd257665a342e0 (patch) | |
| tree | a2fe5938e923ad40e7935e8b885e2b3f965042b6 /compiler/rustc_query_system/src | |
| parent | d3ec14bbec7d3647a3c1a3bfdf2cafb0f72bf937 (diff) | |
| download | rust-c43a6f05d6cedbb6a191e0c307cd257665a342e0.tar.gz rust-c43a6f05d6cedbb6a191e0c307cd257665a342e0.zip | |
Add some comments
Diffstat (limited to 'compiler/rustc_query_system/src')
| -rw-r--r-- | compiler/rustc_query_system/src/dep_graph/graph.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_query_system/src/dep_graph/serialized.rs | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index 180a2c9edf6..3ae56cef2c4 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -1341,7 +1341,8 @@ impl DepNodeColorMap { } /// This tries to atomically mark a node green and assign `index` as the new - /// index. + /// index. This returns `Ok` if `index` gets assigned, otherwise it returns + /// the alreadly allocated index in `Err`. #[inline] pub(super) fn try_mark_green( &self, diff --git a/compiler/rustc_query_system/src/dep_graph/serialized.rs b/compiler/rustc_query_system/src/dep_graph/serialized.rs index e88d95b6b07..648823edb18 100644 --- a/compiler/rustc_query_system/src/dep_graph/serialized.rs +++ b/compiler/rustc_query_system/src/dep_graph/serialized.rs @@ -585,6 +585,7 @@ impl<D: Deps> EncoderState<D> { DepNodeIndex::from_u32(local.next_node_index) } + /// Marks the index previously returned by `next_index` as used. #[inline] fn bump_index(&self, local: &mut LocalEncoderState) { local.remaining_node_index -= 1; |
