Merge the BTreeMap in hir::Crate.

This commit is contained in:
Camille GILLOT
2021-02-05 15:47:44 +01:00
parent 0443424954
commit 36a28060f1
14 changed files with 268 additions and 119 deletions

View File

@@ -81,14 +81,10 @@ impl<'a, 'hir> NodeCollector<'a, 'hir> {
let Crate {
ref item,
// These fields are handled separately:
exported_macros: _,
non_exported_macro_attrs: _,
items: _,
trait_items: _,
impl_items: _,
foreign_items: _,
bodies: _,
owners: _,
trait_impls: _,
bodies: _,
body_ids: _,
modules: _,
proc_macros: _,

View File

@@ -554,8 +554,8 @@ impl<'hir> Map<'hir> {
where
V: Visitor<'hir>,
{
for id in self.krate().exported_macros {
visitor.visit_macro_def(self.expect_macro_def(id.hir_id()));
for macro_def in self.krate().exported_macros() {
visitor.visit_macro_def(macro_def);
}
}