@@ -31,7 +31,7 @@ pub struct RustdocVisitor<'a, 'tcx: 'a, 'rcx: 'a> {
3131 pub module : Module ,
3232 pub attrs : hir:: HirVec < ast:: Attribute > ,
3333 pub cx : & ' a core:: DocContext < ' a , ' tcx , ' rcx > ,
34- view_item_stack : FxHashSet < ast :: NodeId > ,
34+ view_item_stack : FxHashSet < hir :: HirId > ,
3535 inlining : bool ,
3636 /// Are the current module and all of its parents public?
3737 inside_public_path : bool ,
@@ -44,7 +44,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
4444 ) -> RustdocVisitor < ' a , ' tcx , ' rcx > {
4545 // If the root is re-exported, terminate all recursion.
4646 let mut stack = FxHashSet :: default ( ) ;
47- stack. insert ( ast :: CRATE_NODE_ID ) ;
47+ stack. insert ( hir :: CRATE_HIR_ID ) ;
4848 RustdocVisitor {
4949 module : Module :: new ( None ) ,
5050 attrs : hir:: HirVec :: new ( ) ,
@@ -269,13 +269,13 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
269269 om : & mut Module ,
270270 please_inline : bool ) -> bool {
271271
272- fn inherits_doc_hidden ( cx : & core:: DocContext < ' _ , ' _ , ' _ > , mut node : ast :: NodeId ) -> bool {
272+ fn inherits_doc_hidden ( cx : & core:: DocContext < ' _ , ' _ , ' _ > , mut node : hir :: HirId ) -> bool {
273273 while let Some ( id) = cx. tcx . hir ( ) . get_enclosing_scope ( node) {
274274 node = id;
275275 if cx. tcx . hir ( ) . attrs ( node) . lists ( "doc" ) . has_word ( "hidden" ) {
276276 return true ;
277277 }
278- if node == ast :: CRATE_NODE_ID {
278+ if node == hir :: CRATE_HIR_ID {
279279 break ;
280280 }
281281 }
@@ -324,21 +324,21 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
324324 return false
325325 }
326326
327- let def_node_id = match tcx. hir ( ) . as_local_node_id ( def_did) {
327+ let def_hir_id = match tcx. hir ( ) . as_local_hir_id ( def_did) {
328328 Some ( n) => n, None => return false
329329 } ;
330330
331331 let is_private = !self . cx . renderinfo . borrow ( ) . access_levels . is_public ( def_did) ;
332- let is_hidden = inherits_doc_hidden ( self . cx , def_node_id ) ;
332+ let is_hidden = inherits_doc_hidden ( self . cx , def_hir_id ) ;
333333
334334 // Only inline if requested or if the item would otherwise be stripped.
335335 if ( !please_inline && !is_private && !is_hidden) || is_no_inline {
336336 return false
337337 }
338338
339- if !self . view_item_stack . insert ( def_node_id ) { return false }
339+ if !self . view_item_stack . insert ( def_hir_id ) { return false }
340340
341- let ret = match tcx. hir ( ) . get ( def_node_id ) {
341+ let ret = match tcx. hir ( ) . get_by_hir_id ( def_hir_id ) {
342342 Node :: Item ( & hir:: Item { node : hir:: ItemKind :: Mod ( ref m) , .. } ) if glob => {
343343 let prev = mem:: replace ( & mut self . inlining , true ) ;
344344 for i in & m. item_ids {
@@ -371,7 +371,7 @@ impl<'a, 'tcx, 'rcx> RustdocVisitor<'a, 'tcx, 'rcx> {
371371 }
372372 _ => false ,
373373 } ;
374- self . view_item_stack . remove ( & def_node_id ) ;
374+ self . view_item_stack . remove ( & def_hir_id ) ;
375375 ret
376376 }
377377
0 commit comments