Add rustdoc version into the help popup

This commit is contained in:
Guillaume Gomez 2021-09-15 13:37:29 +02:00
parent e0c38af27c
commit cd3f4da244
6 changed files with 39 additions and 13 deletions

View file

@ -268,10 +268,18 @@ pub(super) fn write_shared(
// Maybe we can change the representation to move this out of main.js?
write_minify(
"main.js",
static_files::MAIN_JS.replace(
"/* INSERT THEMES HERE */",
&format!(" = {}", serde_json::to_string(&themes).unwrap()),
),
static_files::MAIN_JS
.replace(
"/* INSERT THEMES HERE */",
&format!(" = {}", serde_json::to_string(&themes).unwrap()),
)
.replace(
"/* INSERT RUSTDOC_VERSION HERE */",
&format!(
"rustdoc {}",
rustc_interface::util::version_str().unwrap_or("unknown version")
),
),
cx,
options,
)?;