about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-08-20 15:21:59 +0200
committerJakub Beránek <berykubik@gmail.com>2025-08-30 15:28:40 +0200
commit0f2fc03068ae60eed918fab13ccd89ff120dd403 (patch)
tree28be93ecb2aaf51ae91d528e3f0f1d56ef9877cf /src
parente759b97838f10b52163834315bf486d6972df3de (diff)
downloadrust-0f2fc03068ae60eed918fab13ccd89ff120dd403.tar.gz
rust-0f2fc03068ae60eed918fab13ccd89ff120dd403.zip
Remove stage0 checking
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 7c4256e9836..9b27f006392 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -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<'_>) {