Skip to content

Commit

Permalink
Rebase fallout.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Nov 26, 2020
1 parent 12a3024 commit d6b22fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ impl<'a> Visitor<'a> for ItemLowerer<'a, '_, '_> {
}

fn visit_foreign_item(&mut self, item: &'a ForeignItem) {
self.lctx.allocate_hir_id_counter(item.id);
self.lctx.with_hir_id_owner(item.id, |lctx| {
let hir_item = lctx.lower_foreign_item(item);
let id = hir::ForeignItemId { hir_id: hir_item.hir_id };
Expand Down
5 changes: 5 additions & 0 deletions compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
visit::walk_assoc_item(self, item, ctxt);
}

fn visit_foreign_item(&mut self, item: &'tcx ForeignItem) {
self.lctx.allocate_hir_id_counter(item.id);
visit::walk_foreign_item(self, item);
}

fn visit_ty(&mut self, t: &'tcx Ty) {
match t.kind {
// Mirrors the case in visit::walk_ty
Expand Down

0 comments on commit d6b22fa

Please sign in to comment.