Closed
Description
I found this originally while testing out #95445, but it's also present on master.
I tried this code: x test --stage 0 --doc compiler/rustc_lint_defs
I expected to see this happen: Tests pass, like they do for --stage 1
.
Instead, this happened:
Doc-tests rustc_lint_defs
running 106 tests
ii..........i..i.....i......i.ii.i.......i......iii.....................i.F......i..i.............i. 100/106
......
failures:
---- src/builtin.rs - builtin::UNFULFILLED_LINT_EXPECTATIONS (line 503) stdout ----
error: cannot find attribute `expect` in this scope
--> src/builtin.rs:506:3
|
5 | #[expect(unused_variables)]
| ^^^^^^
error: aborting due to previous error
Couldn't compile the test.
failures:
src/builtin.rs - builtin::UNFULFILLED_LINT_EXPECTATIONS (line 503)
test result: FAILED. 88 passed; 1 failed; 17 ignored; 0 measured; 0 filtered out; finished in 2.42s
It's unclear to me whether this is a bug in bootstrap / rustdoc / rustc_lint_defs, or whether doc-tests for the compiler just don't support --stage 0? If so I could add a warning the same way compiletest warns:
Lines 1261 to 1269 in 05d2221
cc @Mark-Simulacrum in case you have ideas.
Meta
HEAD is 11909e3.
@rustbot label +A-rustbuild