about summary refs log tree commit diff
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2025-07-29 12:37:30 +1000
committerZalathar <Zalathar@users.noreply.github.com>2025-08-29 13:16:24 +1000
commit6340b97768cc3803d96de92c8571d49f79f3e2ed (patch)
tree89ab54cb0d4c9fd48692831fc32f90d77e93b847
parentc80cadee6424ac5ad8fe017c4ea0b18a5bff4b56 (diff)
downloadrust-6340b97768cc3803d96de92c8571d49f79f3e2ed.tar.gz
rust-6340b97768cc3803d96de92c8571d49f79f3e2ed.zip
Don't print captures in `TestCx::normalize_platform_differences`
This appears to have been leftover debugging code.

If the capture information turns out to have still been useful, we can find a
way to emit it in a way that doesn't interfere with overhauling compiletests's
output capture system.
-rw-r--r--src/tools/compiletest/src/runtest.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index eea471bc6cb..867624cc8fa 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -2678,8 +2678,8 @@ impl<'test> TestCx<'test> {
         //
         // It's not possible to detect paths in the error messages generally, but this is a
         // decent enough heuristic.
-        static_regex!(
-                r#"(?x)
+        let re = static_regex!(
+            r#"(?x)
                 (?:
                   # Match paths that don't include spaces.
                   (?:\\[\pL\pN\.\-_']+)+\.\pL+
@@ -2687,11 +2687,8 @@ impl<'test> TestCx<'test> {
                   # If the path starts with a well-known root, then allow spaces and no file extension.
                   \$(?:DIR|SRC_DIR|TEST_BUILD_DIR|BUILD_DIR|LIB_DIR)(?:\\[\pL\pN\.\-_'\ ]+)+
                 )"#
-            )
-            .replace_all(&output, |caps: &Captures<'_>| {
-                println!("{}", &caps[0]);
-                caps[0].replace(r"\", "/")
-            })
+        );
+        re.replace_all(&output, |caps: &Captures<'_>| caps[0].replace(r"\", "/"))
             .replace("\r\n", "\n")
     }