about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/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
commita68ec2205335e2c3de8ba56fb6a31b99f10c95a6 (patch)
tree240c87f61d31e116c19d2fa1a6b5ff2d0e8ed223 /compiler/rustc_codegen_cranelift/src/debuginfo
parent7eef946fc0e0eff40e588eab77b09b287accbec3 (diff)
downloadrust-a68ec2205335e2c3de8ba56fb6a31b99f10c95a6.tar.gz
rust-a68ec2205335e2c3de8ba56fb6a31b99f10c95a6.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 'compiler/rustc_codegen_cranelift/src/debuginfo')
-rw-r--r--compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
index c55db2017ee..2ba012a77b0 100644
--- a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs
+++ b/compiler/rustc_codegen_cranelift/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