Skip to content

Commit 9f00730

Browse files
committed
Add comment.
1 parent 1b9ccbf commit 9f00730

File tree

1 file changed

+2
-0
lines changed
  • src/librustc_ast_lowering

1 file changed

+2
-0
lines changed

src/librustc_ast_lowering/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
624624

625625
let hir_id = if let Some(existing_hir_id) = self.node_id_to_hir_id[ast_node_id] {
626626
if span != DUMMY_SP {
627+
// Some HIR owners are lowered before the traversal of the AST.
628+
// They use DUMMY_SP as a placeholder, to be overwritten here.
627629
debug_assert!(
628630
self.spans[existing_hir_id] == DUMMY_SP || self.spans[existing_hir_id] == span
629631
);

0 commit comments

Comments
 (0)