@@ -303,10 +303,11 @@ fn invoke_rustdoc(
303
303
. arg ( & out)
304
304
. arg ( & path)
305
305
. arg ( "--markdown-css" )
306
- . arg ( "../rust.css" ) ;
306
+ . arg ( "../rust.css" )
307
+ . arg ( "-Zunstable-options" ) ;
307
308
308
309
if !builder. config . docs_minification {
309
- cmd. arg ( "-Z" ) . arg ( "unstable-options" ) . arg ( "- -disable-minification") ;
310
+ cmd. arg ( "--disable-minification" ) ;
310
311
}
311
312
312
313
cmd. run ( builder) ;
@@ -376,8 +377,6 @@ impl Step for Standalone {
376
377
}
377
378
378
379
let mut cmd = builder. rustdoc_cmd ( compiler) ;
379
- // Needed for --index-page flag
380
- cmd. arg ( "-Z" ) . arg ( "unstable-options" ) ;
381
380
382
381
cmd. arg ( "--html-after-content" )
383
382
. arg ( & footer)
@@ -386,6 +385,7 @@ impl Step for Standalone {
386
385
. arg ( "--html-in-header" )
387
386
. arg ( & favicon)
388
387
. arg ( "--markdown-no-toc" )
388
+ . arg ( "-Zunstable-options" )
389
389
. arg ( "--index-page" )
390
390
. arg ( builder. src . join ( "src/doc/index.md" ) )
391
391
. arg ( "--markdown-playground-url" )
@@ -478,9 +478,6 @@ impl Step for Releases {
478
478
mem:: drop ( tmpfile) ;
479
479
let mut cmd = builder. rustdoc_cmd ( compiler) ;
480
480
481
- // Needed for --index-page flag
482
- cmd. arg ( "-Z" ) . arg ( "unstable-options" ) ;
483
-
484
481
cmd. arg ( "--html-after-content" )
485
482
. arg ( & footer)
486
483
. arg ( "--html-before-content" )
@@ -490,6 +487,7 @@ impl Step for Releases {
490
487
. arg ( "--markdown-no-toc" )
491
488
. arg ( "--markdown-css" )
492
489
. arg ( "rust.css" )
490
+ . arg ( "-Zunstable-options" )
493
491
. arg ( "--index-page" )
494
492
. arg ( builder. src . join ( "src/doc/index.md" ) )
495
493
. arg ( "--markdown-playground-url" )
@@ -636,6 +634,8 @@ impl Step for Std {
636
634
if !builder. config . docs_minification {
637
635
extra_args. push ( "--disable-minification" ) ;
638
636
}
637
+ // For `--index-page` and `--output-format=json`.
638
+ extra_args. push ( "-Zunstable-options" ) ;
639
639
640
640
doc_std ( builder, self . format , stage, target, & out, & extra_args, & crates) ;
641
641
@@ -715,8 +715,6 @@ fn doc_std(
715
715
. arg ( "--target-dir" )
716
716
. arg ( & * target_dir. to_string_lossy ( ) )
717
717
. arg ( "-Zskip-rustdoc-fingerprint" )
718
- . rustdocflag ( "-Z" )
719
- . rustdocflag ( "unstable-options" )
720
718
. rustdocflag ( "--resource-suffix" )
721
719
. rustdocflag ( & builder. version ) ;
722
720
for arg in extra_args {
@@ -822,15 +820,13 @@ impl Step for Rustc {
822
820
// Since we always pass --document-private-items, there's no need to warn about linking to private items.
823
821
cargo. rustdocflag ( "-Arustdoc::private-intra-doc-links" ) ;
824
822
cargo. rustdocflag ( "--enable-index-page" ) ;
825
- cargo. rustdocflag ( "-Zunstable-options" ) ;
826
823
cargo. rustdocflag ( "-Znormalize-docs" ) ;
827
824
cargo. rustdocflag ( "--show-type-layout" ) ;
828
825
// FIXME: `--generate-link-to-definition` tries to resolve cfged out code
829
826
// see https://github.com/rust-lang/rust/pull/122066#issuecomment-1983049222
830
827
// cargo.rustdocflag("--generate-link-to-definition");
831
828
832
829
compile:: rustc_cargo ( builder, & mut cargo, target, & compiler) ;
833
- cargo. arg ( "-Zunstable-options" ) ;
834
830
cargo. arg ( "-Zskip-rustdoc-fingerprint" ) ;
835
831
836
832
// Only include compiler crates, no dependencies of those, such as `libc`.
@@ -986,7 +982,6 @@ macro_rules! tool_doc {
986
982
cargo. rustdocflag( "-Arustdoc::private-intra-doc-links" ) ;
987
983
cargo. rustdocflag( "--enable-index-page" ) ;
988
984
cargo. rustdocflag( "--show-type-layout" ) ;
989
- cargo. rustdocflag( "-Zunstable-options" ) ;
990
985
// FIXME: `--generate-link-to-definition` tries to resolve cfged out code
991
986
// see https://github.com/rust-lang/rust/pull/122066#issuecomment-1983049222
992
987
// cargo.rustdocflag("--generate-link-to-definition");
0 commit comments