about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustdoc/clean/mod.rs6
-rw-r--r--src/librustdoc/doctree.rs8
-rw-r--r--src/librustdoc/visit_ast.rs3
3 files changed, 7 insertions, 10 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index bf09e8785ad..aee9b74c31c 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -654,9 +654,9 @@ impl Clean<Item> for doctree::Module<'_> {
             attrs,
             source: whence.clean(cx),
             visibility: self.vis.clean(cx),
-            stability: cx.stability(self.hid).clean(cx),
-            deprecation: cx.deprecation(self.hid).clean(cx),
-            def_id: cx.tcx.hir().local_def_id_from_node_id(self.id),
+            stability: cx.stability(self.id).clean(cx),
+            deprecation: cx.deprecation(self.id).clean(cx),
+            def_id: cx.tcx.hir().local_def_id(self.id),
             inner: ModuleItem(Module {
                is_crate: self.is_crate,
                items,
diff --git a/src/librustdoc/doctree.rs b/src/librustdoc/doctree.rs
index 39714708572..90dcf1be76c 100644
--- a/src/librustdoc/doctree.rs
+++ b/src/librustdoc/doctree.rs
@@ -3,7 +3,7 @@
 pub use self::StructType::*;
 
 use syntax::ast;
-use syntax::ast::{Name, NodeId};
+use syntax::ast::Name;
 use syntax::ext::base::MacroKind;
 use syntax_pos::{self, Span};
 
@@ -23,8 +23,7 @@ pub struct Module<'hir> {
     pub enums: Vec<Enum<'hir>>,
     pub fns: Vec<Function<'hir>>,
     pub mods: Vec<Module<'hir>>,
-    pub id: NodeId,
-    pub hid: hir::HirId,
+    pub id: hir::HirId,
     pub typedefs: Vec<Typedef<'hir>>,
     pub opaque_tys: Vec<OpaqueTy<'hir>>,
     pub statics: Vec<Static<'hir>>,
@@ -47,8 +46,7 @@ impl Module<'hir> {
     ) -> Module<'hir> {
         Module {
             name       : name,
-            id: ast::CRATE_NODE_ID,
-            hid: hir::CRATE_HIR_ID,
+            id: hir::CRATE_HIR_ID,
             vis,
             where_outer: syntax_pos::DUMMY_SP,
             where_inner: syntax_pos::DUMMY_SP,
diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs
index 002721afbc4..f01b9eeb30f 100644
--- a/src/librustdoc/visit_ast.rs
+++ b/src/librustdoc/visit_ast.rs
@@ -206,8 +206,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
         let mut om = Module::new(name, attrs, vis);
         om.where_outer = span;
         om.where_inner = m.inner;
-        om.hid = id;
-        om.id = self.cx.tcx.hir().hir_to_node_id(id);
+        om.id = id;
         // Keep track of if there were any private modules in the path.
         let orig_inside_public_path = self.inside_public_path;
         self.inside_public_path &= vis.node.is_pub();