Skip to content

Commit 0215068

Browse files
author
Thomas Jespersen
committed
Change static to const.
This commit rust-lang/rust@f35f973 changes `static`s to `const`s in quite a few places in libunicode. For some reason, this causes rustc to dump its core, which is in itself a bug, but here we can fix it by changing some static variables to const.
1 parent 056a21d commit 0215068

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/parse.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,18 +1071,18 @@ static ASCII_CLASSES: NamedClasses = &[
10711071
("xdigit", &XDIGIT),
10721072
];
10731073

1074-
static ALNUM: Class = &[('0', '9'), ('A', 'Z'), ('a', 'z')];
1075-
static ALPHA: Class = &[('A', 'Z'), ('a', 'z')];
1076-
static ASCII: Class = &[('\x00', '\x7F')];
1077-
static BLANK: Class = &[(' ', ' '), ('\t', '\t')];
1078-
static CNTRL: Class = &[('\x00', '\x1F'), ('\x7F', '\x7F')];
1079-
static DIGIT: Class = &[('0', '9')];
1080-
static GRAPH: Class = &[('!', '~')];
1081-
static LOWER: Class = &[('a', 'z')];
1082-
static PRINT: Class = &[(' ', '~')];
1083-
static PUNCT: Class = &[('!', '/'), (':', '@'), ('[', '`'), ('{', '~')];
1084-
static SPACE: Class = &[('\t', '\t'), ('\n', '\n'), ('\x0B', '\x0B'),
1074+
const ALNUM: Class = &[('0', '9'), ('A', 'Z'), ('a', 'z')];
1075+
const ALPHA: Class = &[('A', 'Z'), ('a', 'z')];
1076+
const ASCII: Class = &[('\x00', '\x7F')];
1077+
const BLANK: Class = &[(' ', ' '), ('\t', '\t')];
1078+
const CNTRL: Class = &[('\x00', '\x1F'), ('\x7F', '\x7F')];
1079+
const DIGIT: Class = &[('0', '9')];
1080+
const GRAPH: Class = &[('!', '~')];
1081+
const LOWER: Class = &[('a', 'z')];
1082+
const PRINT: Class = &[(' ', '~')];
1083+
const PUNCT: Class = &[('!', '/'), (':', '@'), ('[', '`'), ('{', '~')];
1084+
const SPACE: Class = &[('\t', '\t'), ('\n', '\n'), ('\x0B', '\x0B'),
10851085
('\x0C', '\x0C'), ('\r', '\r'), (' ', ' ')];
1086-
static UPPER: Class = &[('A', 'Z')];
1087-
static WORD: Class = &[('0', '9'), ('A', 'Z'), ('a', 'z'), ('_', '_')];
1088-
static XDIGIT: Class = &[('0', '9'), ('A', 'F'), ('a', 'f')];
1086+
const UPPER: Class = &[('A', 'Z')];
1087+
const WORD: Class = &[('0', '9'), ('A', 'Z'), ('a', 'z'), ('_', '_')];
1088+
const XDIGIT: Class = &[('0', '9'), ('A', 'F'), ('a', 'f')];

0 commit comments

Comments
 (0)