File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use crate::clean::{
77} ;
88use crate :: core:: DocContext ;
99use crate :: formats:: item_type:: ItemType ;
10+ use crate :: visit_lib:: LibEmbargoVisitor ;
1011
1112use rustc_ast as ast;
1213use rustc_ast:: tokenstream:: TokenTree ;
@@ -26,6 +27,11 @@ mod tests;
2627crate fn krate ( cx : & mut DocContext < ' _ > ) -> Crate {
2728 let module = crate :: visit_ast:: RustdocVisitor :: new ( cx) . visit ( ) ;
2829
30+ for & cnum in cx. tcx . crates ( ( ) ) {
31+ // Analyze doc-reachability for extern items
32+ LibEmbargoVisitor :: new ( cx) . visit_lib ( cnum) ;
33+ }
34+
2935 // Clean the crate, translating the entire librustc_ast AST to one that is
3036 // understood by rustdoc.
3137 let mut module = module. clean ( cx) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ use crate::formats::Impl;
1414use crate :: html:: markdown:: short_markdown_summary;
1515use crate :: html:: render:: cache:: { get_index_search_type, ExternalLocation } ;
1616use crate :: html:: render:: IndexItem ;
17- use crate :: visit_lib:: LibEmbargoVisitor ;
1817
1918/// This cache is used to store information about the [`clean::Crate`] being
2019/// rendered in order to provide more useful documentation. This contains
@@ -148,8 +147,6 @@ impl Cache {
148147 // FIXME: this part is specific to HTML so it'd be nice to remove it from the common code
149148 for & crate_num in cx. tcx . crates ( ( ) ) {
150149 let e = ExternalCrate { crate_num } ;
151- // Analyze doc-reachability for extern items
152- LibEmbargoVisitor :: new ( cx) . visit_lib ( e. crate_num ) ;
153150
154151 let name = e. name ( tcx) ;
155152 let render_options = & cx. render_options ;
You can’t perform that action at this time.
0 commit comments