rustdoc: add hash to filename of toolchain files · rust-lang/rust@f9e1f6f (original) (raw)
`@@ -32,7 +32,7 @@ use crate::html::escape::Escape;
`
32
32
`use crate::html::format::{join_with_double_colon, Buffer};
`
33
33
`use crate::html::markdown::{self, plain_text_summary, ErrorCodes, IdMap};
`
34
34
`use crate::html::url_parts_builder::UrlPartsBuilder;
`
35
``
`-
use crate::html::{layout, sources};
`
``
35
`+
use crate::html::{layout, sources, static_files};
`
36
36
`use crate::scrape_examples::AllCallLocations;
`
37
37
`use crate::try_err;
`
38
38
``
`@@ -498,7 +498,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
`
498
498
`);
`
499
499
``
500
500
`let (sender, receiver) = channel();
`
501
``
`-
let mut scx = SharedContext {
`
``
501
`+
let scx = SharedContext {
`
502
502
` tcx,
`
503
503
` src_root,
`
504
504
` local_sources,
`
`@@ -521,19 +521,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
`
521
521
` call_locations,
`
522
522
`};
`
523
523
``
524
``
`` -
// Add the default themes to the Vec
of stylepaths
``
525
``
`-
//
`
526
``
`` -
// Note that these must be added before sources::render
is called
``
527
``
`-
// so that the resulting source pages are styled
`
528
``
`-
//
`
529
``
`` -
// light.css
is not disabled because it is the stylesheet that stays loaded
``
530
``
`-
// by the browser as the theme stylesheet. The theme system (hackily) works by
`
531
``
`-
// changing the href to this stylesheet. All other themes are disabled to
`
532
``
`-
// prevent rule conflicts
`
533
``
`-
scx.style_files.push(StylePath { path: PathBuf::from("light.css") });
`
534
``
`-
scx.style_files.push(StylePath { path: PathBuf::from("dark.css") });
`
535
``
`-
scx.style_files.push(StylePath { path: PathBuf::from("ayu.css") });
`
536
``
-
537
524
`let dst = output;
`
538
525
` scx.ensure_dir(&dst)?;
`
539
526
``
`@@ -647,10 +634,11 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
`
647
634
` \
`
648
635
` \
`
649
636
` <link rel="stylesheet" type="text/css" \
`
650
``
`-
href="{root_path}settings{suffix}.css">\
`
651
``
`-
",`
652
``
`-
root_path = page.static_root_path.unwrap_or(""),
`
653
``
`-
suffix = page.resource_suffix,
`
``
637
`+
href="{static_root_path}{settings_css}">\
`
``
638
`+
",`
``
639
`+
static_root_path = page.static_root_path.unwrap_or(""),
`
``
640
`+
settings_css = static_files::STATIC_FILES.settings_css,
`
``
641
`+
settings_js = static_files::STATIC_FILES.settings_js,
`
654
642
`)
`
655
643
`},
`
656
644
`&shared.style_files,
`