@@ -35,6 +35,7 @@ use std::path::PathBuf;
35
35
use visit_ast:: RustdocVisitor ;
36
36
use clean;
37
37
use clean:: Clean ;
38
+ use html:: markdown:: RenderType ;
38
39
use html:: render:: RenderInfo ;
39
40
40
41
pub use rustc:: session:: config:: Input ;
@@ -54,6 +55,8 @@ pub struct DocContext<'a, 'tcx: 'a> {
54
55
pub renderinfo : RefCell < RenderInfo > ,
55
56
/// Later on moved through `clean::Crate` into `html::render::CACHE_KEY`
56
57
pub external_traits : RefCell < FxHashMap < DefId , clean:: Trait > > ,
58
+ /// Which markdown renderer to use when extracting links.
59
+ pub render_type : RenderType ,
57
60
58
61
// The current set of type and lifetime substitutions,
59
62
// for expanding type aliases at the HIR level:
@@ -104,7 +107,8 @@ pub fn run_core(search_paths: SearchPaths,
104
107
triple : Option < String > ,
105
108
maybe_sysroot : Option < PathBuf > ,
106
109
allow_warnings : bool ,
107
- force_unstable_if_unmarked : bool ) -> ( clean:: Crate , RenderInfo )
110
+ force_unstable_if_unmarked : bool ,
111
+ render_type : RenderType ) -> ( clean:: Crate , RenderInfo )
108
112
{
109
113
// Parse, resolve, and typecheck the given crate.
110
114
@@ -207,6 +211,7 @@ pub fn run_core(search_paths: SearchPaths,
207
211
access_levels : RefCell :: new ( access_levels) ,
208
212
external_traits : Default :: default ( ) ,
209
213
renderinfo : Default :: default ( ) ,
214
+ render_type,
210
215
ty_substs : Default :: default ( ) ,
211
216
lt_substs : Default :: default ( ) ,
212
217
} ;
0 commit comments