Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions regex-automata/src/dfa/dense.rs
Original file line number Diff line number Diff line change
Expand Up @@ -919,21 +919,21 @@ impl Config {
/// Anchored, Input,
/// };
///
/// // 200KB isn't enough!
/// // 300KB isn't enough!
/// dense::Builder::new()
/// .configure(dense::Config::new()
/// .determinize_size_limit(Some(200_000))
/// .determinize_size_limit(Some(300_000))
/// .start_kind(StartKind::Anchored)
/// )
/// .build(r"\w{20}")
/// .unwrap_err();
///
/// // ... but 300KB probably is!
/// // ... but 400KB probably is!
/// // (Note that auxiliary storage sizes aren't necessarily stable between
/// // releases.)
/// let dfa = dense::Builder::new()
/// .configure(dense::Config::new()
/// .determinize_size_limit(Some(300_000))
/// .determinize_size_limit(Some(400_000))
/// .start_kind(StartKind::Anchored)
/// )
/// .build(r"\w{20}")?;
Expand Down Expand Up @@ -5166,7 +5166,7 @@ impl core::fmt::Display for BuildError {
// only way this error can occur). Thus, the total number of
// patterns that can fit in the table is `stride` less than
// what we can allocate.
let max = usize::try_from(core::isize::MAX).unwrap();
let max = usize::try_from(isize::MAX).unwrap();
let limit = (max - stride) / stride;
write!(
f,
Expand Down
2 changes: 0 additions & 2 deletions regex-automata/src/util/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1961,8 +1961,6 @@ mod tests {
let _ = s.offset(1);
}

use super::*;

// We test that our 'MatchError' type is the size we expect. This isn't an
// API guarantee, but if the size increases, we really want to make sure we
// decide to do that intentionally. So this should be a speed bump. And in
Expand Down
91 changes: 56 additions & 35 deletions regex-automata/src/util/unicode_data/perl_word.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// DO NOT EDIT THIS FILE. IT WAS AUTOMATICALLY GENERATED BY:
//
// ucd-generate perl-word ucd-16.0.0 --chars
// ucd-generate perl-word /home/andrew/rust/ucd-generate/tmp/unicode18 --chars
//
// Unicode version: 16.0.0.
// Unicode version: 18.0.0.
//
// ucd-generate 0.3.1 is available on crates.io.
// ucd-generate 0.3.2 is available on crates.io.

pub const PERL_WORD: &'static [(char, char)] = &[
('0', '9'),
Expand Down Expand Up @@ -33,13 +33,14 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('Ϸ', 'ҁ'),
('\u{483}', 'ԯ'),
('Ա', 'Ֆ'),
('ՙ', 'ՙ'),
('՘', 'ՙ'),
('ՠ', 'ֈ'),
('֋', '֌'),
('\u{591}', '\u{5bd}'),
('\u{5bf}', '\u{5bf}'),
('\u{5c1}', '\u{5c2}'),
('\u{5c4}', '\u{5c5}'),
('\u{5c7}', '\u{5c7}'),
('\u{5c7}', '\u{5c9}'),
('א', 'ת'),
('ׯ', 'ײ'),
('\u{610}', '\u{61a}'),
Expand All @@ -58,7 +59,7 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('ࡀ', '\u{85b}'),
('ࡠ', 'ࡪ'),
('ࡰ', 'ࢇ'),
('ࢉ', 'ࢎ'),
('ࢉ', '࢏'),
('\u{897}', '\u{8e1}'),
('\u{8e3}', '\u{963}'),
('०', '९'),
Expand Down Expand Up @@ -118,7 +119,7 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('\u{b3c}', '\u{b44}'),
('େ', 'ୈ'),
('ୋ', '\u{b4d}'),
('\u{b55}', '\u{b57}'),
('\u{b53}', '\u{b57}'),
('ଡ଼', 'ଢ଼'),
('ୟ', '\u{b63}'),
('୦', '୯'),
Expand Down Expand Up @@ -148,7 +149,7 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('\u{c4a}', '\u{c4d}'),
('\u{c55}', '\u{c56}'),
('ౘ', 'ౚ'),
('ౝ', 'ౝ'),
('౜', 'ౝ'),
('ౠ', '\u{c63}'),
('౦', '౯'),
('ಀ', 'ಃ'),
Expand All @@ -161,7 +162,7 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('\u{cc6}', '\u{cc8}'),
('\u{cca}', '\u{ccd}'),
('\u{cd5}', '\u{cd6}'),
('ೝ', 'ೞ'),
('೜', 'ೞ'),
('ೠ', '\u{ce3}'),
('೦', '೯'),
('ೱ', 'ೳ'),
Expand Down Expand Up @@ -272,7 +273,7 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('\u{1a7f}', '᪉'),
('᪐', '᪙'),
('ᪧ', 'ᪧ'),
('\u{1ab0}', '\u{1ace}'),
('\u{1ab0}', '\u{1af0}'),
('\u{1b00}', 'ᭌ'),
('᭐', '᭙'),
('\u{1b6b}', '\u{1b73}'),
Expand Down Expand Up @@ -309,7 +310,7 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('⁔', '⁔'),
('ⁱ', 'ⁱ'),
('ⁿ', 'ⁿ'),
('ₐ', 'ₜ'),
('₏', '₟'),
('\u{20d0}', '\u{20f0}'),
('ℂ', 'ℂ'),
('ℇ', 'ℇ'),
Expand Down Expand Up @@ -367,11 +368,9 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('ꙿ', '\u{a6f1}'),
('ꜗ', 'ꜟ'),
('Ꜣ', 'ꞈ'),
('Ꞌ', 'ꟍ'),
('Ꟑ', 'ꟑ'),
('ꟓ', 'ꟓ'),
('ꟕ', 'Ƛ'),
('ꟲ', 'ꠧ'),
('Ꞌ', '꟝'),
('꟢', '꟢'),
('꟱', 'ꠧ'),
('\u{a82c}', '\u{a82c}'),
('ꡀ', 'ꡳ'),
('ꢀ', '\u{a8c5}'),
Expand Down Expand Up @@ -399,6 +398,7 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('ꬨ', 'ꬮ'),
('ꬰ', 'ꭚ'),
('ꭜ', 'ꭩ'),
('꭬', '꭭'),
('ꭰ', 'ꯪ'),
('꯬', '\u{abed}'),
('꯰', '꯹'),
Expand Down Expand Up @@ -474,7 +474,7 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('𐝠', '𐝧'),
('𐞀', '𐞅'),
('𐞇', '𐞰'),
('𐞲', '𐞺'),
('𐞲', '𐞿'),
('𐠀', '𐠅'),
('𐠈', '𐠈'),
('𐠊', '𐠵'),
Expand All @@ -487,6 +487,7 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('𐣴', '𐣵'),
('𐤀', '𐤕'),
('𐤠', '𐤹'),
('𐥀', '𐥙'),
('𐦀', '𐦷'),
('𐦾', '𐦿'),
('𐨀', '\u{10a03}'),
Expand Down Expand Up @@ -515,8 +516,10 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('𐺀', '𐺩'),
('\u{10eab}', '\u{10eac}'),
('𐺰', '𐺱'),
('𐻂', '𐻄'),
('\u{10efc}', '𐼜'),
('𐻂', '𐻇'),
('\u{10ecb}', '\u{10ecf}'),
('𐻙', '𐻮'),
('\u{10ef0}', '𐼜'),
('𐼧', '𐼧'),
('𐼰', '\u{10f50}'),
('𐽰', '\u{10f85}'),
Expand Down Expand Up @@ -610,6 +613,8 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('𑩐', '\u{11a99}'),
('𑪝', '𑪝'),
('𑪰', '𑫸'),
('𑬊', '𑬊'),
('\u{11b60}', '𑭧'),
('𑯀', '𑯠'),
('𑯰', '𑯹'),
('𑰀', '𑰈'),
Expand All @@ -632,15 +637,19 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('\u{11d90}', '\u{11d91}'),
('𑶓', '𑶘'),
('𑶠', '𑶩'),
('𑶰', '𑷛'),
('𑷠', '𑷩'),
('\u{11df0}', '𑷱'),
('𑻠', '𑻶'),
('\u{11f00}', '𑼐'),
('𑼒', '\u{11f3a}'),
('𑼾', '\u{11f42}'),
('𑽐', '\u{11f5a}'),
('𑾰', '𑾰'),
('𒀀', '𒎙'),
('𒐀', '𒑮'),
('𒒀', '𒕃'),
('𒐀', '𒑯'),
('𒑵', '𒕃'),
('𒕐', '𒚆'),
('𒾐', '𒿰'),
('𓀀', '𓐯'),
('\u{13440}', '\u{13455}'),
Expand All @@ -662,23 +671,27 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('𖵀', '𖵬'),
('𖵰', '𖵹'),
('𖹀', '𖹿'),
('𖺠', '𖺸'),
('𖺻', '𖻓'),
('𖼀', '𖽊'),
('\u{16f4f}', '𖾇'),
('\u{16f8f}', '𖾟'),
('𖿠', '𖿡'),
('𖿣', '\u{16fe4}'),
('\u{16ff0}', '\u{16ff1}'),
('𗀀', '𘟷'),
('𘠀', '𘳕'),
('𘳿', '𘴈'),
('\u{16ff0}', '𖿶'),
('𗀀', '𘳚'),
('𘳿', '𘴠'),
('𘶀', '𘷲'),
('𘸀', '𙆑'),
('𙆠', '𙇒'),
('𚿰', '𚿳'),
('𚿵', '𚿻'),
('𚿽', '𚿾'),
('𛀀', '𛄢'),
('𛀀', '𛄨'),
('𛄲', '𛄲'),
('𛅐', '𛅒'),
('𛅕', '𛅕'),
('𛅤', '𛅧'),
('𛅤', '𛅨'),
('𛅰', '𛋻'),
('𛰀', '𛱪'),
('𛱰', '𛱼'),
Expand All @@ -688,12 +701,17 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('𜳰', '𜳹'),
('\u{1cf00}', '\u{1cf2d}'),
('\u{1cf30}', '\u{1cf46}'),
('\u{1d127}', '\u{1d128}'),
('\u{1d165}', '\u{1d169}'),
('\u{1d16d}', '\u{1d172}'),
('\u{1d17b}', '\u{1d182}'),
('\u{1d185}', '\u{1d18b}'),
('\u{1d1aa}', '\u{1d1ad}'),
('\u{1d242}', '\u{1d244}'),
('\u{1d250}', '\u{1d252}'),
('\u{1d25b}', '\u{1d25c}'),
('\u{1d25f}', '\u{1d25f}'),
('\u{1d280}', '\u{1d281}'),
('𝐀', '𝑔'),
('𝑖', '𝒜'),
('𝒞', '𝒟'),
Expand All @@ -712,7 +730,7 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('𝕀', '𝕄'),
('𝕆', '𝕆'),
('𝕊', '𝕐'),
('𝕒', '𝚥'),
('𝕒', '𝚦'),
('𝚨', '𝛀'),
('𝛂', '𝛚'),
('𝛜', '𝛺'),
Expand All @@ -731,9 +749,9 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('\u{1da84}', '\u{1da84}'),
('\u{1da9b}', '\u{1da9f}'),
('\u{1daa1}', '\u{1daaf}'),
('𝼀', '𝼞'),
('𝼥', '𝼪'),
('\u{1e000}', '\u{1e006}'),
('𝼀', '𝾁'),
('𝾐', '𝾖'),
('𝿍', '\u{1e006}'),
('\u{1e008}', '\u{1e018}'),
('\u{1e01b}', '\u{1e021}'),
('\u{1e023}', '\u{1e024}'),
Expand All @@ -748,6 +766,9 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('𞋀', '𞋹'),
('𞓐', '𞓹'),
('𞗐', '𞗺'),
('𞛀', '𞛞'),
('𞛠', '\u{1e6f5}'),
('𞛾', '𞛿'),
('𞟠', '𞟦'),
('𞟨', '𞟫'),
('𞟭', '𞟮'),
Expand Down Expand Up @@ -794,13 +815,13 @@ pub const PERL_WORD: &'static [(char, char)] = &[
('🅰', '🆉'),
('🯰', '🯹'),
('𠀀', '𪛟'),
('𪜀', '𫜹'),
('𫝀', '𫠝'),
('𫠠', '𬺡'),
('𪜀', '𫠞'),
('𫠠', '𬺭'),
('𬺰', '𮯠'),
('𮯰', '𮹝'),
('丽', '𪘀'),
('𰀀', '𱍊'),
('𱍐', '𲎯'),
('𱍐', '𳑹'),
('𽀀', '𿰿'),
('\u{e0100}', '\u{e01ef}'),
];
2 changes: 1 addition & 1 deletion regex-lite/src/pikevm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl PikeVM {
// isize, and so this assert should always pass. But we put it here to
// make our assumption explicit.
assert!(
haystack.len() < core::usize::MAX,
haystack.len() < usize::MAX,
"byte slice lengths must be less than usize MAX",
);

Expand Down
2 changes: 2 additions & 0 deletions regex-syntax/src/unicode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,8 @@ fn ages(canonical_age: &str) -> Result<impl Iterator<Item = Range>, Error> {
("V15_0", age::V15_0),
("V15_1", age::V15_1),
("V16_0", age::V16_0),
("V17_0", age::V17_0),
("V18_0", age::V18_0),
];
assert_eq!(AGES.len(), age::BY_NAME.len(), "ages are out of sync");

Expand Down
Loading
Loading