Skip to content

Commit 0202259

Browse files
committed
Require a colon in //@ normalize-*: headers
1 parent 7024c63 commit 0202259

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Diff for: src/tools/compiletest/src/header.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1315,13 +1315,11 @@ fn expand_variables(mut value: String, config: &Config) -> String {
13151315
/// normalize-*: "REGEX" -> "REPLACEMENT"
13161316
/// ```
13171317
fn parse_normalize_rule(header: &str) -> Option<(String, String)> {
1318-
// FIXME(#126370): A colon after the header name should be mandatory, but
1319-
// currently is not, and there are many tests that lack the colon.
13201318
// FIXME: Support escaped double-quotes in strings.
13211319
let captures = static_regex!(
13221320
r#"(?x) # (verbose mode regex)
13231321
^
1324-
[^:\s]+:?\s* # (header name followed by optional colon)
1322+
[^:\s]+:\s* # (header name followed by colon)
13251323
"(?<regex>[^"]*)" # "REGEX"
13261324
\s+->\s+ # ->
13271325
"(?<replacement>[^"]*)" # "REPLACEMENT"

0 commit comments

Comments
 (0)