diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2022-11-09 15:39:07 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-09 15:39:07 -0500 |
| commit | 70c04a2fd1738ece290631c53c59616c30febdf9 (patch) | |
| tree | bc2d4cc03695a0ead4727eae58f93c2874813fc2 /src/librustdoc/html | |
| parent | 656f56c2d697488bd775449c8e711c5cd1070901 (diff) | |
| parent | a68ec2205335e2c3de8ba56fb6a31b99f10c95a6 (diff) | |
| download | rust-70c04a2fd1738ece290631c53c59616c30febdf9.tar.gz rust-70c04a2fd1738ece290631c53c59616c30febdf9.zip | |
Rollup merge of #104184 - jyn514:rustdoc-version, r=davidtwco
Fix `rustdoc --version` when used with download-rustc Previously, rustdoc would unconditionally report the version that *rustc* was compiled with. That showed things like `nightly-2022-10-30`, which wasn't right, since this was a `dev` build compiled from source. Fix it by changing `rustc_driver::version` to a macro expanded at invocation time. cc https://github.com/rust-lang/rust/issues/103206#issuecomment-1284123084
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/layout.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index 48c6abfca90..a60e7cb10fa 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -71,7 +71,7 @@ pub(crate) fn render<T: Print, S: Print>( let mut themes: Vec<String> = style_files.iter().map(|s| s.basename().unwrap()).collect(); themes.sort(); - let rustdoc_version = rustc_interface::util::version_str().unwrap_or("unknown version"); + let rustdoc_version = rustc_interface::util::version_str!().unwrap_or("unknown version"); let content = Buffer::html().to_display(t); // Note: This must happen before making the sidebar. let sidebar = Buffer::html().to_display(sidebar); PageLayout { |
