]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast_lowering/src/item.rs
Gather module items after lowering.
[rust.git] / compiler / rustc_ast_lowering / src / item.rs
index b7497c713f3df32d76a8f04ce0e6e98b0a4720c4..252bc676dbeefd6c9d34d6706070edbcb9105954 100644 (file)
@@ -50,12 +50,6 @@ fn visit_item(&mut self, item: &'a Item) {
         self.lctx.with_parent_item_lifetime_defs(hir_id, |this| {
             let this = &mut ItemLowerer { lctx: this };
             match item.kind {
-                ItemKind::Mod(..) => {
-                    let def_id = this.lctx.lower_node_id(item.id).expect_owner();
-                    let old_current_module = mem::replace(&mut this.lctx.current_module, def_id);
-                    visit::walk_item(this, item);
-                    this.lctx.current_module = old_current_module;
-                }
                 ItemKind::Impl(box ImplKind { ref of_trait, .. }) => {
                     this.with_trait_impl_ref(of_trait, |this| visit::walk_item(this, item));
                 }