Do not preallocate item HirIds.

This commit is contained in:
Camille GILLOT
2021-07-14 18:54:56 +02:00
parent d2dfb0eb8e
commit 59f43bdd29
3 changed files with 20 additions and 47 deletions

View File

@@ -55,7 +55,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
}
}
StmtKind::Item(ref it) => {
stmts.extend(self.lower_item_id(it).into_iter().enumerate().map(
stmts.extend(self.lower_item_ref(it).into_iter().enumerate().map(
|(i, item_id)| {
let hir_id = match i {
0 => self.lower_node_id(s.id),