]> 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 57a680f45b304072552e7ace03788815d58f17e8..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));
                 }
@@ -1353,7 +1347,7 @@ pub(super) fn lower_generics_mut(
         // Error if `?Trait` bounds in where clauses don't refer directly to type paramters.
         // Note: we used to clone these bounds directly onto the type parameter (and avoid lowering
         // these into hir when we lower thee where clauses), but this makes it quite difficult to
-        // keep track of the Span info. Now, `is_unsized` in `AstConv` checks both param bounds and
+        // keep track of the Span info. Now, `add_implicitly_sized` in `AstConv` checks both param bounds and
         // where clauses for `?Sized`.
         for pred in &generics.where_clause.predicates {
             if let WherePredicate::BoundPredicate(ref bound_pred) = *pred {