@@ -15,7 +15,6 @@ use rustc_span::symbol::sym;
1515
1616use super :: print_item:: { full_path, item_path, print_item} ;
1717use super :: search_index:: build_index;
18- use super :: templates;
1918use super :: write_shared:: write_shared;
2019use super :: {
2120 collect_spans_and_sources, print_sidebar, settings, AllTypes , LinkFromSrc , NameDoc , StylePath ,
@@ -118,8 +117,6 @@ crate struct SharedContext<'tcx> {
118117 /// the crate.
119118 redirections : Option < RefCell < FxHashMap < String , String > > > ,
120119
121- pub ( crate ) templates : tera:: Tera ,
122-
123120 /// Correspondance map used to link types used in the source code pages to allow to click on
124121 /// links to jump to the type's definition.
125122 crate span_correspondance_map : FxHashMap < rustc_span:: Span , LinkFromSrc > ,
@@ -218,11 +215,10 @@ impl<'tcx> Context<'tcx> {
218215
219216 if !self . render_redirect_pages {
220217 layout:: render (
221- & self . shared . templates ,
222218 & self . shared . layout ,
223219 & page,
224220 |buf : & mut _ | print_sidebar ( self , it, buf) ,
225- |buf : & mut _ | print_item ( self , & self . shared . templates , it, buf, & page) ,
221+ |buf : & mut _ | print_item ( self , it, buf, & page) ,
226222 & self . shared . style_files ,
227223 )
228224 } else {
@@ -426,7 +422,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
426422 } ;
427423 let mut issue_tracker_base_url = None ;
428424 let mut include_sources = true ;
429- let templates = templates:: load ( ) ?;
430425
431426 // Crawl the crate attributes looking for attributes which control how we're
432427 // going to emit HTML
@@ -481,7 +476,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
481476 errors : receiver,
482477 redirections : if generate_redirect_map { Some ( Default :: default ( ) ) } else { None } ,
483478 show_type_layout,
484- templates,
485479 span_correspondance_map : matches,
486480 cache,
487481 call_locations,
@@ -577,7 +571,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
577571 } ;
578572 let all = self . shared . all . replace ( AllTypes :: new ( ) ) ;
579573 let v = layout:: render (
580- & self . shared . templates ,
581574 & self . shared . layout ,
582575 & page,
583576 sidebar,
@@ -599,7 +592,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
599592 . map ( StylePath :: basename)
600593 . collect :: < Result < _ , Error > > ( ) ?;
601594 let v = layout:: render (
602- & self . shared . templates ,
603595 & self . shared . layout ,
604596 & page,
605597 sidebar,
0 commit comments