Skip to content

Commit 6340b97

Browse files
committed
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.
1 parent c80cade commit 6340b97

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,20 +2678,17 @@ impl<'test> TestCx<'test> {
26782678
//
26792679
// It's not possible to detect paths in the error messages generally, but this is a
26802680
// decent enough heuristic.
2681-
static_regex!(
2682-
r#"(?x)
2681+
let re = static_regex!(
2682+
r#"(?x)
26832683
(?:
26842684
# Match paths that don't include spaces.
26852685
(?:\\[\pL\pN\.\-_']+)+\.\pL+
26862686
|
26872687
# If the path starts with a well-known root, then allow spaces and no file extension.
26882688
\$(?:DIR|SRC_DIR|TEST_BUILD_DIR|BUILD_DIR|LIB_DIR)(?:\\[\pL\pN\.\-_'\ ]+)+
26892689
)"#
2690-
)
2691-
.replace_all(&output, |caps: &Captures<'_>| {
2692-
println!("{}", &caps[0]);
2693-
caps[0].replace(r"\", "/")
2694-
})
2690+
);
2691+
re.replace_all(&output, |caps: &Captures<'_>| caps[0].replace(r"\", "/"))
26952692
.replace("\r\n", "\n")
26962693
}
26972694

0 commit comments

Comments
 (0)