Skip to content

Commit

Permalink
Ensure walk_item visits GlobalAsm NodeId
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mrhota committed Apr 13, 2017
1 parent 70fcff6 commit 7be5043
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc/hir/intravisit.rs
Expand Up @@ -474,7 +474,9 @@ pub fn walk_item<'v, V: Visitor<'v>>(visitor: &mut V, item: &'v Item) {
visitor.visit_id(item.id);
walk_list!(visitor, visit_foreign_item, &foreign_module.items);
}
ItemGlobalAsm(_) => {}
ItemGlobalAsm(_) => {
visitor.visit_id(item.id);
}
ItemTy(ref typ, ref type_parameters) => {
visitor.visit_id(item.id);
visitor.visit_ty(typ);
Expand Down

0 comments on commit 7be5043

Please sign in to comment.