@@ -15,7 +15,6 @@ use rustc_span::symbol::sym;
15
15
16
16
use super :: print_item:: { full_path, item_path, print_item} ;
17
17
use super :: search_index:: build_index;
18
- use super :: templates;
19
18
use super :: write_shared:: write_shared;
20
19
use super :: {
21
20
collect_spans_and_sources, print_sidebar, settings, AllTypes , LinkFromSrc , NameDoc , StylePath ,
@@ -118,8 +117,6 @@ crate struct SharedContext<'tcx> {
118
117
/// the crate.
119
118
redirections : Option < RefCell < FxHashMap < String , String > > > ,
120
119
121
- pub ( crate ) templates : tera:: Tera ,
122
-
123
120
/// Correspondance map used to link types used in the source code pages to allow to click on
124
121
/// links to jump to the type's definition.
125
122
crate span_correspondance_map : FxHashMap < rustc_span:: Span , LinkFromSrc > ,
@@ -218,11 +215,10 @@ impl<'tcx> Context<'tcx> {
218
215
219
216
if !self . render_redirect_pages {
220
217
layout:: render (
221
- & self . shared . templates ,
222
218
& self . shared . layout ,
223
219
& page,
224
220
|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) ,
226
222
& self . shared . style_files ,
227
223
)
228
224
} else {
@@ -391,7 +387,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
391
387
extension_css,
392
388
resource_suffix,
393
389
static_root_path,
394
- generate_search_filter,
395
390
unstable_features,
396
391
generate_redirect_map,
397
392
show_type_layout,
@@ -421,12 +416,10 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
421
416
default_settings,
422
417
krate : krate. name ( tcx) . to_string ( ) ,
423
418
css_file_extension : extension_css,
424
- generate_search_filter,
425
419
scrape_examples_extension : !call_locations. is_empty ( ) ,
426
420
} ;
427
421
let mut issue_tracker_base_url = None ;
428
422
let mut include_sources = true ;
429
- let templates = templates:: load ( ) ?;
430
423
431
424
// Crawl the crate attributes looking for attributes which control how we're
432
425
// going to emit HTML
@@ -481,7 +474,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
481
474
errors : receiver,
482
475
redirections : if generate_redirect_map { Some ( Default :: default ( ) ) } else { None } ,
483
476
show_type_layout,
484
- templates,
485
477
span_correspondance_map : matches,
486
478
cache,
487
479
call_locations,
@@ -577,7 +569,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
577
569
} ;
578
570
let all = self . shared . all . replace ( AllTypes :: new ( ) ) ;
579
571
let v = layout:: render (
580
- & self . shared . templates ,
581
572
& self . shared . layout ,
582
573
& page,
583
574
sidebar,
@@ -599,7 +590,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
599
590
. map ( StylePath :: basename)
600
591
. collect :: < Result < _ , Error > > ( ) ?;
601
592
let v = layout:: render (
602
- & self . shared . templates ,
603
593
& self . shared . layout ,
604
594
& page,
605
595
sidebar,
0 commit comments