Remove stage0 checking

This commit is contained in:
Jakub Beránek 2025-08-20 15:21:59 +02:00
parent e759b97838
commit 0f2fc03068
No known key found for this signature in database
GPG key ID: 909CD0D26483516B

View file

@ -3691,18 +3691,6 @@ impl Step for CodegenGCC {
}
}
/// Get a build compiler that can be used to test the standard library (i.e. its stage will
/// correspond to the stage that we want to test).
fn get_test_build_compiler_for_std(builder: &Builder<'_>) -> Compiler {
if builder.top_stage == 0 {
eprintln!(
"ERROR: cannot run tests on stage 0. `build.compiletest-allow-stage0` only works for compiletest test suites."
);
exit!(1);
}
builder.compiler(builder.top_stage, builder.host_target)
}
/// Test step that does two things:
/// - Runs `cargo test` for the `src/tools/test-float-parse` tool.
/// - Invokes the `test-float-parse` tool to test the standard library's
@ -3732,10 +3720,8 @@ impl Step for TestFloatParse {
}
fn make_run(run: RunConfig<'_>) {
run.builder.ensure(Self {
build_compiler: get_test_build_compiler_for_std(run.builder),
target: run.target,
});
run.builder
.ensure(Self { build_compiler: get_compiler_to_test(run.builder), target: run.target });
}
fn run(self, builder: &Builder<'_>) {