Skip to content

Commit 8fc8aa9

Browse files
committed
Auto merge of rust-lang#11904 - pgerber:regex, r=xFrednet
Update regex-syntax to support new word boundry assertions From the regex v1.10.0 release notes [1]: This is a new minor release of regex that adds support for start and end word boundary assertions. [...] The new word boundary assertions are: • \< or \b{start}: a Unicode start-of-word boundary (\W|\A on the left, \w on the right). • \> or \b{end}: a Unicode end-of-word boundary (\w on the left, \W|\z on the right)). • \b{start-half}: half of a Unicode start-of-word boundary (\W|\A on the left). • \b{end-half}: half of a Unicode end-of-word boundary (\W|\z on the right). [1]: https://github.com/rust-lang/regex/blob/master/CHANGELOG.md#1100-2023-10-09 changelog: [`regex`]: add support for start and end word boundary assertions ("\<", "\b{start}", etc.) introduced in regex v0.10
2 parents 8851621 + af1b58f commit 8fc8aa9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

clippy_lints/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ clippy_utils = { path = "../clippy_utils" }
1616
declare_clippy_lint = { path = "../declare_clippy_lint" }
1717
itertools = "0.11"
1818
quine-mc_cluskey = "0.2"
19-
regex-syntax = "0.7"
19+
regex-syntax = "0.8"
2020
serde = { version = "1.0", features = ["derive"] }
2121
serde_json = { version = "1.0", optional = true }
2222
tempfile = { version = "3.3.0", optional = true }

tests/ui/regex.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ fn trivial_regex() {
112112

113113
// #6005: unicode classes in bytes::Regex
114114
let a_byte_of_unicode = BRegex::new(r"\p{C}");
115+
116+
// start and end word boundry, introduced in regex 0.10
117+
let _ = BRegex::new(r"\<word\>");
118+
let _ = BRegex::new(r"\b{start}word\b{end}");
115119
}
116120

117121
fn main() {

0 commit comments

Comments
 (0)