@@ -163,7 +163,6 @@ struct Context {
163
163
/// real location of an item. This is used to allow external links to
164
164
/// publicly reused items to redirect to the right location.
165
165
pub render_redirect_pages : bool ,
166
- pub codes : ErrorCodes ,
167
166
/// The map used to ensure all generated 'id=' attributes are unique.
168
167
id_map : Rc < RefCell < IdMap > > ,
169
168
pub shared : Arc < SharedContext > ,
@@ -208,6 +207,7 @@ crate struct SharedContext {
208
207
pub fs : DocFS ,
209
208
/// The default edition used to parse doctests.
210
209
pub edition : Edition ,
210
+ pub codes : ErrorCodes ,
211
211
}
212
212
213
213
impl SharedContext {
@@ -540,6 +540,7 @@ pub fn run(mut krate: clean::Crate,
540
540
generate_redirect_pages,
541
541
fs : DocFS :: new ( & errors) ,
542
542
edition,
543
+ codes : ErrorCodes :: from ( UnstableFeatures :: from_environment ( ) . is_nightly_build ( ) ) ,
543
544
} ;
544
545
545
546
// If user passed in `--playground-url` arg, we fill in crate name here
@@ -585,7 +586,6 @@ pub fn run(mut krate: clean::Crate,
585
586
current : Vec :: new ( ) ,
586
587
dst,
587
588
render_redirect_pages : false ,
588
- codes : ErrorCodes :: from ( UnstableFeatures :: from_environment ( ) . is_nightly_build ( ) ) ,
589
589
id_map : Rc :: new ( RefCell :: new ( id_map) ) ,
590
590
shared : Arc :: new ( scx) ,
591
591
playground,
@@ -2353,7 +2353,7 @@ fn render_markdown(
2353
2353
if is_hidden { " hidden" } else { "" } ,
2354
2354
prefix,
2355
2355
Markdown ( md_text, & links, & mut ids,
2356
- cx. codes, cx. shared. edition, & cx. playground) . to_string( ) )
2356
+ cx. shared . codes, cx. shared. edition, & cx. playground) . to_string( ) )
2357
2357
}
2358
2358
2359
2359
fn document_short (
@@ -3961,7 +3961,7 @@ fn render_impl(w: &mut Buffer, cx: &Context, i: &Impl, link: AssocItemLink<'_>,
3961
3961
let mut ids = cx. id_map . borrow_mut ( ) ;
3962
3962
write ! ( w, "<div class='docblock'>{}</div>" ,
3963
3963
Markdown ( & * dox, & i. impl_item. links( ) , & mut ids,
3964
- cx. codes, cx. shared. edition, & cx. playground) . to_string( ) ) ;
3964
+ cx. shared . codes, cx. shared. edition, & cx. playground) . to_string( ) ) ;
3965
3965
}
3966
3966
}
3967
3967
0 commit comments