Skip to content

Commit 23fea67

Browse files
committed
Match hyphen in multi-revision comment matchers
Currently, the matcher `//[rev-foo,rev-bar]~` does not get selected by the regex. Change the matcher to also match strings that contain a `-`.h
1 parent d1a0fa5 commit 23fea67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/compiletest/src/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ fn parse_expected(
118118
// //[rev1]~
119119
// //[rev1,rev2]~^^
120120
static RE: Lazy<Regex> =
121-
Lazy::new(|| Regex::new(r"//(?:\[(?P<revs>[\w,]+)])?~(?P<adjust>\||\^*)").unwrap());
121+
Lazy::new(|| Regex::new(r"//(?:\[(?P<revs>[\w\-,]+)])?~(?P<adjust>\||\^*)").unwrap());
122122

123123
let captures = RE.captures(line)?;
124124

0 commit comments

Comments
 (0)