@@ -19,7 +19,7 @@ use super::print_item::{full_path, item_path, print_item};
1919use super :: write_shared:: write_shared;
2020use super :: {
2121 print_sidebar, settings, AllTypes , NameDoc , SharedContext , StylePath , BASIC_KEYWORDS ,
22- CURRENT_DEPTH , INITIAL_IDS ,
22+ INITIAL_IDS ,
2323} ;
2424
2525use crate :: clean:: { self , AttributesExt } ;
@@ -106,12 +106,6 @@ impl<'tcx> Context<'tcx> {
106106 }
107107
108108 fn render_item ( & self , it : & clean:: Item , pushname : bool ) -> String {
109- // A little unfortunate that this is done like this, but it sure
110- // does make formatting *a lot* nicer.
111- CURRENT_DEPTH . with ( |slot| {
112- slot. set ( self . current . len ( ) ) ;
113- } ) ;
114-
115109 let mut title = if it. is_primitive ( ) || it. is_keyword ( ) {
116110 // No need to include the namespace for primitive types and keywords
117111 String :: new ( )
@@ -422,8 +416,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
422416 redirections : if generate_redirect_map { Some ( Default :: default ( ) ) } else { None } ,
423417 } ;
424418
425- CURRENT_DEPTH . with ( |s| s. set ( 0 ) ) ;
426-
427419 // Write shared runs within a flock; disable thread dispatching of IO temporarily.
428420 Arc :: get_mut ( & mut cx. shared ) . unwrap ( ) . fs . set_sync_only ( true ) ;
429421 write_shared ( & cx, & krate, index, & md_opts) ?;
0 commit comments