@@ -362,15 +362,6 @@ impl<'a> LoweringContext<'a> {
362
362
}
363
363
364
364
impl < ' lcx , ' interner > Visitor < ' lcx > for MiscCollector < ' lcx , ' interner > {
365
- fn visit_mod ( & mut self , m : & ' lcx Mod , _s : Span , _attrs : & [ Attribute ] , n : NodeId ) {
366
- self . lctx . modules . insert ( n, hir:: ModuleItems {
367
- items : BTreeSet :: new ( ) ,
368
- trait_items : BTreeSet :: new ( ) ,
369
- impl_items : BTreeSet :: new ( ) ,
370
- } ) ;
371
- visit:: walk_mod ( self , m) ;
372
- }
373
-
374
365
fn visit_item ( & mut self , item : & ' lcx Item ) {
375
366
self . lctx . allocate_hir_id_counter ( item. id , item) ;
376
367
@@ -430,6 +421,12 @@ impl<'a> LoweringContext<'a> {
430
421
431
422
impl < ' lcx , ' interner > Visitor < ' lcx > for ItemLowerer < ' lcx , ' interner > {
432
423
fn visit_mod ( & mut self , m : & ' lcx Mod , _s : Span , _attrs : & [ Attribute ] , n : NodeId ) {
424
+ self . lctx . modules . insert ( n, hir:: ModuleItems {
425
+ items : BTreeSet :: new ( ) ,
426
+ trait_items : BTreeSet :: new ( ) ,
427
+ impl_items : BTreeSet :: new ( ) ,
428
+ } ) ;
429
+
433
430
let old = self . lctx . current_module ;
434
431
self . lctx . current_module = n;
435
432
visit:: walk_mod ( self , m) ;
0 commit comments