about summary refs log tree commit diff
path: root/src/debuginfo
diff options
context:
space:
mode:
authorJoshua Nelson <jnelson@cloudflare.com>2022-11-09 02:52:59 -0600
committerJoshua Nelson <jnelson@cloudflare.com>2022-11-09 02:54:51 -0600
commitade426fa83a4840a3940aee184e8b65ecfeeb6aa (patch)
tree2f5511927e99107d88a92edc4654423008b61535 /src/debuginfo
parentb166ad0b1ebd65db9241da72e08308f87ce6e50f (diff)
downloadrust-ade426fa83a4840a3940aee184e8b65ecfeeb6aa.tar.gz
rust-ade426fa83a4840a3940aee184e8b65ecfeeb6aa.zip
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.
Diffstat (limited to 'src/debuginfo')
-rw-r--r--src/debuginfo/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debuginfo/mod.rs b/src/debuginfo/mod.rs
index c55db2017ee..2ba012a77b0 100644
--- a/src/debuginfo/mod.rs
+++ b/src/debuginfo/mod.rs
@@ -59,7 +59,7 @@ impl DebugContext {
 
         let producer = format!(
             "cg_clif (rustc {}, cranelift {})",
-            rustc_interface::util::version_str().unwrap_or("unknown version"),
+            rustc_interface::util::rustc_version_str().unwrap_or("unknown version"),
             cranelift_codegen::VERSION,
         );
         let comp_dir = tcx