@@ -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 {
@@ -391,7 +387,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
391387 extension_css,
392388 resource_suffix,
393389 static_root_path,
394- generate_search_filter,
395390 unstable_features,
396391 generate_redirect_map,
397392 show_type_layout,
@@ -421,12 +416,10 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
421416 default_settings,
422417 krate : krate. name ( tcx) . to_string ( ) ,
423418 css_file_extension : extension_css,
424- generate_search_filter,
425419 scrape_examples_extension : !call_locations. is_empty ( ) ,
426420 } ;
427421 let mut issue_tracker_base_url = None ;
428422 let mut include_sources = true ;
429- let templates = templates:: load ( ) ?;
430423
431424 // Crawl the crate attributes looking for attributes which control how we're
432425 // going to emit HTML
@@ -481,7 +474,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
481474 errors : receiver,
482475 redirections : if generate_redirect_map { Some ( Default :: default ( ) ) } else { None } ,
483476 show_type_layout,
484- templates,
485477 span_correspondance_map : matches,
486478 cache,
487479 call_locations,
@@ -577,7 +569,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
577569 } ;
578570 let all = self . shared . all . replace ( AllTypes :: new ( ) ) ;
579571 let v = layout:: render (
580- & self . shared . templates ,
581572 & self . shared . layout ,
582573 & page,
583574 sidebar,
@@ -599,7 +590,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
599590 . map ( StylePath :: basename)
600591 . collect :: < Result < _ , Error > > ( ) ?;
601592 let v = layout:: render (
602- & self . shared . templates ,
603593 & self . shared . layout ,
604594 & page,
605595 sidebar,
0 commit comments