Skip to content

Commit f557363

Browse files
committed
compiletest: Make a FIXME for escaped newlines less confusing
The old FIXME implies that we don't support escaped newlines, but in fact it was added in the same patch that added support for escaped newlines. The new FIXME makes it clear that we do currently support this, and that the FIXME is for doing so in a less ad-hoc way.
1 parent 3a4e821 commit f557363

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/compiletest/src/header.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,9 @@ fn parse_normalize_rule(raw_value: &str) -> Option<(String, String)> {
11561156
.captures(raw_value)?;
11571157
let regex = captures["regex"].to_owned();
11581158
let replacement = captures["replacement"].to_owned();
1159-
// FIXME: Support escaped new-line in strings.
1159+
// A `\n` sequence in the replacement becomes an actual newline.
1160+
// FIXME: Do unescaping in a less ad-hoc way, and perhaps support escaped
1161+
// backslashes and double-quotes.
11601162
let replacement = replacement.replace("\\n", "\n");
11611163
Some((regex, replacement))
11621164
}

0 commit comments

Comments
 (0)