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