Skip to content

Commit 9bb8430

Browse files
committed
Add some comments
1 parent e5a1efb commit 9bb8430

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compiler/rustc_query_system/src/dep_graph/graph.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,8 @@ impl DepNodeColorMap {
13411341
}
13421342

13431343
/// This tries to atomically mark a node green and assign `index` as the new
1344-
/// index.
1344+
/// index. This returns `Ok` if `index` gets assigned, otherwise it returns
1345+
/// the alreadly allocated index in `Err`.
13451346
#[inline]
13461347
pub(super) fn try_mark_green(
13471348
&self,

compiler/rustc_query_system/src/dep_graph/serialized.rs

+1
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ impl<D: Deps> EncoderState<D> {
585585
DepNodeIndex::from_u32(local.next_node_index)
586586
}
587587

588+
/// Marks the index previously returned by `next_index` as used.
588589
#[inline]
589590
fn bump_index(&self, local: &mut LocalEncoderState) {
590591
local.remaining_node_index -= 1;

0 commit comments

Comments
 (0)