Skip to content

Commit 246a6a6

Browse files
committed
Extend comment on assertion
1 parent e41240e commit 246a6a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/rustc_span/src/hygiene.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1410,8 +1410,12 @@ pub fn decode_syntax_context<D: Decoder, F: FnOnce(&mut D, u32) -> SyntaxContext
14101410
&mut hygiene_data.syntax_context_data[ctxt.as_u32() as usize],
14111411
ctxt_data,
14121412
);
1413-
// Make sure nothing weird happening while `decode_data` was running
14141413
if cfg!(not(parallel_compiler)) {
1414+
// Make sure nothing weird happened while `decode_data` was running.
1415+
// We used `kw::Empty` for the dummy value and we expect nothing to be
1416+
// modifying the dummy entry.
1417+
// This does not hold for the parallel compiler as another thread may
1418+
// have inserted the fully decoded data.
14151419
assert_eq!(dummy.dollar_crate_name, kw::Empty);
14161420
}
14171421
});

0 commit comments

Comments
 (0)