File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -3427,24 +3427,22 @@ impl Step for LintDocs {
3427
3427
const IS_HOST : bool = true ;
3428
3428
3429
3429
fn should_run ( run : ShouldRun < ' _ > ) -> ShouldRun < ' _ > {
3430
- run. path ( "src/tools/lint-docs" )
3430
+ let stage = run. builder . top_stage ;
3431
+ // Lint docs tests might not work with stage 1, so do not run this test by default in
3432
+ // `x test` below stage 2.
3433
+ run. path ( "src/tools/lint-docs" ) . default_condition ( stage > 1 )
3431
3434
}
3432
3435
3433
3436
fn make_run ( run : RunConfig < ' _ > ) {
3434
- // Bump the stage to 2, because the rustc book requires an in-tree compiler.
3435
- // At the same time, since this step is enabled by default, we don't want `x test` to fail
3436
- // in stage 1.
3437
- let stage = if run. builder . config . is_explicit_stage ( ) || run. builder . top_stage >= 2 {
3438
- run. builder . top_stage
3439
- } else {
3440
- 2
3441
- } ;
3437
+ if run. builder . top_stage < 2 {
3438
+ eprintln ! ( "WARNING: lint-docs tests might not work below stage 2" ) ;
3439
+ }
3442
3440
3443
3441
run. builder . ensure ( LintDocs {
3444
3442
build_compiler : prepare_doc_compiler (
3445
3443
run. builder ,
3446
3444
run. builder . config . host_target ,
3447
- stage ,
3445
+ run . builder . top_stage ,
3448
3446
) ,
3449
3447
target : run. target ,
3450
3448
} ) ;
Original file line number Diff line number Diff line change @@ -1980,8 +1980,6 @@ mod snapshot {
1980
1980
[test] link-check <host>
1981
1981
[test] tier-check <host>
1982
1982
[test] rustc 0 <host> -> rust-analyzer 1 <host>
1983
- [doc] rustc (book) <host>
1984
- [test] rustc 1 <host> -> lint-docs 2 <host>
1985
1983
[build] rustc 0 <host> -> RustdocTheme 1 <host>
1986
1984
[test] rustdoc-theme 1 <host>
1987
1985
[test] RustdocUi <host>
You can’t perform that action at this time.
0 commit comments