mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
fix(doc): pass toolchain-shared-resources
to get doc styled (#15605)
### What does this PR try to resolve?
Fixes #15604
rustdoc assumes to add static files only when the
toolchain-shared-resources emit-type is specified, or when no emit-type
is specified.
See
80c34983c6/src/librustdoc/html/render/write_shared.rs (L206-L213)
### How should we test and review this PR?
Not going to write a test because I don't think we want to inspect into
how rustdoc arranges static files.
See #15604 for how to reproduce/test.
### Additional information
cc #15370
This commit is contained in:
commit
36daa739ca
@ -810,8 +810,10 @@ fn prepare_rustdoc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResu
|
||||
add_allow_features(build_runner, &mut rustdoc);
|
||||
|
||||
if build_runner.bcx.gctx.cli_unstable().rustdoc_depinfo {
|
||||
// toolchain-shared-resources is required for keeping the shared styling resources
|
||||
// invocation-specific is required for keeping the original rustdoc emission
|
||||
let mut arg = OsString::from("--emit=invocation-specific,dep-info=");
|
||||
let mut arg =
|
||||
OsString::from("--emit=toolchain-shared-resources,invocation-specific,dep-info=");
|
||||
arg.push(rustdoc_dep_info_loc(build_runner, unit));
|
||||
rustdoc.arg(arg);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user