@@ -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 {
@@ -426,7 +422,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
426
422
} ;
427
423
let mut issue_tracker_base_url = None ;
428
424
let mut include_sources = true ;
429
- let templates = templates:: load ( ) ?;
430
425
431
426
// Crawl the crate attributes looking for attributes which control how we're
432
427
// going to emit HTML
@@ -481,7 +476,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
481
476
errors : receiver,
482
477
redirections : if generate_redirect_map { Some ( Default :: default ( ) ) } else { None } ,
483
478
show_type_layout,
484
- templates,
485
479
span_correspondance_map : matches,
486
480
cache,
487
481
call_locations,
@@ -577,7 +571,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
577
571
} ;
578
572
let all = self . shared . all . replace ( AllTypes :: new ( ) ) ;
579
573
let v = layout:: render (
580
- & self . shared . templates ,
581
574
& self . shared . layout ,
582
575
& page,
583
576
sidebar,
@@ -599,7 +592,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
599
592
. map ( StylePath :: basename)
600
593
. collect :: < Result < _ , Error > > ( ) ?;
601
594
let v = layout:: render (
602
- & self . shared . templates ,
603
595
& self . shared . layout ,
604
596
& page,
605
597
sidebar,
0 commit comments