diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-09-15 13:37:29 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-09-17 17:32:57 +0200 |
| commit | cd3f4da244578a2ab4d17d10016c61b9191b21e4 (patch) | |
| tree | c0f129281b79da59a8a64079e6e2da4caf60eb72 /src/librustdoc/html/render/write_shared.rs | |
| parent | e0c38af27cb5f6f961809601b717d6afc3b190ee (diff) | |
| download | rust-cd3f4da244578a2ab4d17d10016c61b9191b21e4.tar.gz rust-cd3f4da244578a2ab4d17d10016c61b9191b21e4.zip | |
Add rustdoc version into the help popup
Diffstat (limited to 'src/librustdoc/html/render/write_shared.rs')
| -rw-r--r-- | src/librustdoc/html/render/write_shared.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs index 1dd0917699b..c1a83ad5820 100644 --- a/src/librustdoc/html/render/write_shared.rs +++ b/src/librustdoc/html/render/write_shared.rs @@ -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, )?; |
