Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 41e852e

Browse files
committed
Create only one ItemLowerer
1 parent 0b2f257 commit 41e852e

File tree

1 file changed

+8
-7
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+8
-7
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -468,14 +468,15 @@ pub fn lower_to_hir(tcx: TyCtxt<'_>, (): ()) -> hir::Crate<'_> {
468468
tcx.definitions_untracked().def_index_count(),
469469
);
470470

471+
let mut lowerer = item::ItemLowerer {
472+
tcx,
473+
resolver: &mut resolver,
474+
ast_index: &ast_index,
475+
owners: &mut owners,
476+
};
477+
471478
for def_id in ast_index.indices() {
472-
item::ItemLowerer {
473-
tcx,
474-
resolver: &mut resolver,
475-
ast_index: &ast_index,
476-
owners: &mut owners,
477-
}
478-
.lower_node(def_id);
479+
lowerer.lower_node(def_id);
479480
}
480481

481482
// Drop AST to free memory

0 commit comments

Comments
 (0)