File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use crate::clean::{
7
7
} ;
8
8
use crate :: core:: DocContext ;
9
9
use crate :: formats:: item_type:: ItemType ;
10
+ use crate :: visit_lib:: LibEmbargoVisitor ;
10
11
11
12
use rustc_ast as ast;
12
13
use rustc_ast:: tokenstream:: TokenTree ;
@@ -26,6 +27,11 @@ mod tests;
26
27
crate fn krate ( cx : & mut DocContext < ' _ > ) -> Crate {
27
28
let module = crate :: visit_ast:: RustdocVisitor :: new ( cx) . visit ( ) ;
28
29
30
+ for & cnum in cx. tcx . crates ( ( ) ) {
31
+ // Analyze doc-reachability for extern items
32
+ LibEmbargoVisitor :: new ( cx) . visit_lib ( cnum) ;
33
+ }
34
+
29
35
// Clean the crate, translating the entire librustc_ast AST to one that is
30
36
// understood by rustdoc.
31
37
let mut module = module. clean ( cx) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ use crate::formats::Impl;
14
14
use crate :: html:: markdown:: short_markdown_summary;
15
15
use crate :: html:: render:: cache:: { get_index_search_type, ExternalLocation } ;
16
16
use crate :: html:: render:: IndexItem ;
17
- use crate :: visit_lib:: LibEmbargoVisitor ;
18
17
19
18
/// This cache is used to store information about the [`clean::Crate`] being
20
19
/// rendered in order to provide more useful documentation. This contains
@@ -148,8 +147,6 @@ impl Cache {
148
147
// FIXME: this part is specific to HTML so it'd be nice to remove it from the common code
149
148
for & crate_num in cx. tcx . crates ( ( ) ) {
150
149
let e = ExternalCrate { crate_num } ;
151
- // Analyze doc-reachability for extern items
152
- LibEmbargoVisitor :: new ( cx) . visit_lib ( e. crate_num ) ;
153
150
154
151
let name = e. name ( tcx) ;
155
152
let render_options = & cx. render_options ;
You can’t perform that action at this time.
0 commit comments