Skip to content

Commit d1c536a

Browse files
committed
syntax: fixes for Rust 1.20.0
Make sure we can run tests for regex-syntax on Rust 1.20.0.
1 parent 7a52acb commit d1c536a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

regex-syntax/src/hir/translate.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,8 @@ fn hir_ascii_class_bytes(kind: &ast::ClassAsciiKind) -> hir::ClassBytes {
10231023
fn ascii_class(kind: &ast::ClassAsciiKind) -> &'static [(char, char)] {
10241024
use ast::ClassAsciiKind::*;
10251025

1026-
// TODO: Get rid of these consts, which appear necessary for older
1027-
// versions of Rust.
1026+
// The contortions below with `const` appear necessary for older versions
1027+
// of Rust.
10281028
type T = &'static [(char, char)];
10291029
match *kind {
10301030
Alnum => {
@@ -1599,8 +1599,7 @@ mod tests {
15991599
fn escape() {
16001600
assert_eq!(
16011601
t(r"\\\.\+\*\?\(\)\|\[\]\{\}\^\$\#"),
1602-
hir_lit(r"\.+*?()|[]{}^$#"),
1603-
);
1602+
hir_lit(r"\.+*?()|[]{}^$#"));
16041603
}
16051604

16061605
#[test]

regex-syntax/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,7 @@ mod tests {
205205
fn escape_meta() {
206206
assert_eq!(
207207
escape(r"\.+*?()|[]{}^$#&-~"),
208-
r"\\\.\+\*\?\(\)\|\[\]\{\}\^\$\#\&\-\~".to_string(),
209-
);
208+
r"\\\.\+\*\?\(\)\|\[\]\{\}\^\$\#\&\-\~".to_string());
210209
}
211210

212211
#[test]

0 commit comments

Comments
 (0)