about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbinarycat <binarycat@envs.net>2025-01-11 19:27:26 -0600
committerbinarycat <binarycat@envs.net>2025-01-11 19:27:26 -0600
commita55bc72ceaec47e6a6f8e9f01ede83bdfecbb629 (patch)
treeb1aa07147c4f2dd3276e433f348e5cf5a093d183
parent0962afaa8f1f0a84a298e10b68457fdfca3dfad5 (diff)
downloadrust-a55bc72ceaec47e6a6f8e9f01ede83bdfecbb629.tar.gz
rust-a55bc72ceaec47e6a6f8e9f01ede83bdfecbb629.zip
don't use a string constant
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 3688065b20b..c8bea672380 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -30,7 +30,6 @@ use crate::utils::render_tests::{add_flags_and_try_run_tests, try_run_tests};
 use crate::{CLang, DocTests, GitRepo, Mode, PathSet, envify};
 
 const ADB_TEST_DIR: &str = "/data/local/tmp/work";
-const RUSTDOC_JS: &str = "rustdoc-js";
 
 /// Runs `cargo test` on various internal tools used by bootstrap.
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -915,8 +914,8 @@ impl Step for RustdocJSNotStd {
         builder.ensure(Compiletest {
             compiler: self.compiler,
             target: self.target,
-            mode: RUSTDOC_JS,
-            suite: RUSTDOC_JS,
+            mode: "rustdoc-js",
+            suite: "rustdoc-js",
             path: "tests/rustdoc-js",
             compare_mode: None,
         });
@@ -1727,7 +1726,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
         cmd.arg("--minicore-path")
             .arg(builder.src.join("tests").join("auxiliary").join("minicore.rs"));
 
-        let is_rustdoc = suite == "rustdoc-ui" || suite == RUSTDOC_JS;
+        let is_rustdoc = suite == "rustdoc-ui" || suite == "rustdoc-js";
 
         if mode == "run-make" {
             let cargo_path = if builder.top_stage == 0 {
@@ -1755,7 +1754,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
         if mode == "rustdoc"
             || mode == "run-make"
             || (mode == "ui" && is_rustdoc)
-            || mode == RUSTDOC_JS
+            || mode == "rustdoc-js"
             || mode == "rustdoc-json"
             || suite == "coverage-run-rustdoc"
         {
@@ -1827,7 +1826,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
 
         if let Some(ref nodejs) = builder.config.nodejs {
             cmd.arg("--nodejs").arg(nodejs);
-        } else if mode == RUSTDOC_JS {
+        } else if mode == "rustdoc-js" {
             panic!("need nodejs to run rustdoc-js suite");
         }
         if let Some(ref npm) = builder.config.npm {