Skip to content

Commit b068d38

Browse files
committed
Ensure walk_item visits GlobalAsm NodeId
Travis failures indicated the OuterVisitor#visit_item method caused a panic. The Visitor's inner visitor actually relies on the visitor visiting every item's NodeId. I forgot to perform that call in the ItemGlobalAsm match arm, leading to build breakage. The fix is simple: call visit_id(...) for ItemGlobalAsm
1 parent 60cde93 commit b068d38

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc/hir/intravisit.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,9 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
474474
visitor.visit_id(item.id);
475475
walk_list!(visitor, visit_foreign_item, &foreign_module.items);
476476
}
477-
ItemGlobalAsm(_) => {}
477+
ItemGlobalAsm(_) => {
478+
visitor.visit_id(item.id);
479+
}
478480
ItemTy(ref typ, ref type_parameters) => {
479481
visitor.visit_id(item.id);
480482
visitor.visit_ty(typ);

0 commit comments

Comments
 (0)