]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/visit_ast.rs
Use empty Cache for methods requiring it when filling Cache itself
[rust.git] / src / librustdoc / visit_ast.rs
index 1fedd26a1ef2f125e01e282b35027eaee9b31d8f..7d161ca3648ccabfd5630d597e0803f145212f7c 100644 (file)
@@ -316,15 +316,7 @@ fn visit_item(
                     }
                 }
 
-                om.imports.push(Import {
-                    name,
-                    id: item.hir_id,
-                    vis: &item.vis,
-                    attrs: &item.attrs,
-                    path,
-                    glob: is_glob,
-                    span: item.span,
-                });
+                om.items.push((item, renamed))
             }
             hir::ItemKind::Mod(ref m) => {
                 om.mods.push(self.visit_mod_contents(
@@ -352,10 +344,10 @@ fn visit_item(
                     om.items.push((item, renamed));
                 }
             }
-            hir::ItemKind::Impl { ref of_trait, .. } => {
+            hir::ItemKind::Impl(ref impl_) => {
                 // Don't duplicate impls when inlining or if it's implementing a trait, we'll pick
                 // them up regardless of where they're located.
-                if !self.inlining && of_trait.is_none() {
+                if !self.inlining && impl_.of_trait.is_none() {
                     om.items.push((item, None));
                 }
             }