Skip to content

Commit 4bd7c27

Browse files
authored
fix(rustdoc): switch to new --emit options (#16739)
### What does this PR try to resolve? Switch to new rustdoc option accordingly. See the rename PR in <rust-lang/rust#153460>. ### How to test and review this PR?
2 parents 17627c4 + 54f51cc commit 4bd7c27

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/cargo/core/compiler/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -876,14 +876,14 @@ fn prepare_rustdoc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResu
876876
add_allow_features(build_runner, &mut rustdoc);
877877

878878
if build_runner.bcx.gctx.cli_unstable().rustdoc_depinfo {
879-
// toolchain-shared-resources is required for keeping the shared styling resources
880-
// invocation-specific is required for keeping the original rustdoc emission
879+
// html-static-files is required for keeping the shared styling resources
880+
// html-non-static-files is required for keeping the original rustdoc emission
881881
let mut arg = if build_runner.bcx.gctx.cli_unstable().rustdoc_mergeable_info {
882882
// toolchain resources are written at the end, at the same time as merging
883-
OsString::from("--emit=invocation-specific,dep-info=")
883+
OsString::from("--emit=html-non-static-files,dep-info=")
884884
} else {
885885
// if not using mergeable CCI, everything is written every time
886-
OsString::from("--emit=toolchain-shared-resources,invocation-specific,dep-info=")
886+
OsString::from("--emit=html-static-files,html-non-static-files,dep-info=")
887887
};
888888
arg.push(rustdoc_dep_info_loc(build_runner, unit));
889889
rustdoc.arg(arg);
@@ -895,7 +895,7 @@ fn prepare_rustdoc(build_runner: &BuildRunner<'_, '_>, unit: &Unit) -> CargoResu
895895
rustdoc.arg("-Zunstable-options");
896896
} else if build_runner.bcx.gctx.cli_unstable().rustdoc_mergeable_info {
897897
// toolchain resources are written at the end, at the same time as merging
898-
rustdoc.arg("--emit=invocation-specific");
898+
rustdoc.arg("--emit=html-non-static-files");
899899
rustdoc.arg("-Zunstable-options");
900900
}
901901

tests/testsuite/doc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3653,7 +3653,7 @@ fn mergeable_info_rebuild_with_depinfo() {
36533653
.with_stderr_data(
36543654
str![[r#"
36553655
[DOCUMENTING] foo v0.0.0 ([ROOT]/foo)
3656-
[RUNNING] `rustdoc [..]--crate-name foo [..]--emit=invocation-specific,dep-info=[..] --merge=none --parts-out-dir=[ROOT]/foo/target/debug/build/foo-[HASH]/out [..]`
3656+
[RUNNING] `rustdoc [..]--crate-name foo [..]--emit=html-non-static-files,dep-info=[..] --merge=none --parts-out-dir=[ROOT]/foo/target/debug/build/foo-[HASH]/out [..]`
36573657
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
36583658
[MERGING] 1 doc for host
36593659
[RUNNING] `rustdoc -o [ROOT]/foo/target/doc -Zunstable-options --merge=finalize --include-parts-dir=[ROOT]/foo/target/debug/build/foo-[HASH]/out`
@@ -3717,7 +3717,7 @@ fn mergeable_info_rebuild_with_depinfo() {
37173717
str![[r#"
37183718
[DIRTY] foo v0.0.0 ([ROOT]/foo): the file `src/lib.rs` has changed ([TIME_DIFF_AFTER_LAST_BUILD])
37193719
[DOCUMENTING] foo v0.0.0 ([ROOT]/foo)
3720-
[RUNNING] `rustdoc [..]--crate-name foo [..]--emit=invocation-specific,dep-info=[..] --merge=none --parts-out-dir=[ROOT]/foo/target/debug/build/foo-[HASH]/out [..]`
3720+
[RUNNING] `rustdoc [..]--crate-name foo [..]--emit=html-non-static-files,dep-info=[..] --merge=none --parts-out-dir=[ROOT]/foo/target/debug/build/foo-[HASH]/out [..]`
37213721
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
37223722
[MERGING] 1 doc for host
37233723
[RUNNING] `rustdoc -o [ROOT]/foo/target/doc -Zunstable-options --merge=finalize --include-parts-dir=[ROOT]/foo/target/debug/build/foo-[HASH]/out`

0 commit comments

Comments
 (0)