Skip to content

Commit ade426f

Browse files
committed
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.
1 parent b166ad0 commit ade426f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/debuginfo/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl DebugContext {
5959

6060
let producer = format!(
6161
"cg_clif (rustc {}, cranelift {})",
62-
rustc_interface::util::version_str().unwrap_or("unknown version"),
62+
rustc_interface::util::rustc_version_str().unwrap_or("unknown version"),
6363
cranelift_codegen::VERSION,
6464
);
6565
let comp_dir = tcx

0 commit comments

Comments
 (0)