Skip to content

Commit d6b22fa

Browse files
committedNov 26, 2020
Rebase fallout.
1 parent 12a3024 commit d6b22fa

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
 

‎compiler/rustc_ast_lowering/src/item.rs

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ impl<'a> Visitor<'a> for ItemLowerer<'a, '_, '_> {
108108
}
109109

110110
fn visit_foreign_item(&mut self, item: &'a ForeignItem) {
111+
self.lctx.allocate_hir_id_counter(item.id);
111112
self.lctx.with_hir_id_owner(item.id, |lctx| {
112113
let hir_item = lctx.lower_foreign_item(item);
113114
let id = hir::ForeignItemId { hir_id: hir_item.hir_id };

‎compiler/rustc_ast_lowering/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
487487
visit::walk_assoc_item(self, item, ctxt);
488488
}
489489

490+
fn visit_foreign_item(&mut self, item: &'tcx ForeignItem) {
491+
self.lctx.allocate_hir_id_counter(item.id);
492+
visit::walk_foreign_item(self, item);
493+
}
494+
490495
fn visit_ty(&mut self, t: &'tcx Ty) {
491496
match t.kind {
492497
// Mirrors the case in visit::walk_ty

0 commit comments

Comments
 (0)
Please sign in to comment.