summaryrefslogtreecommitdiffstats
path: root/vendor/regex-syntax/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:53 +0000
commit73e0a5b7696ea019ba35b89f38fc8e7b285d99cb (patch)
tree0d2e175af6f114cb50a675bec0bc76e12e1bceb4 /vendor/regex-syntax/src/lib.rs
parentAdding upstream version 1.75.0+dfsg1. (diff)
downloadrustc-upstream.tar.xz
rustc-upstream.zip
Adding upstream version 1.76.0+dfsg1.upstream/1.76.0+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/regex-syntax/src/lib.rs')
-rw-r--r--vendor/regex-syntax/src/lib.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/regex-syntax/src/lib.rs b/vendor/regex-syntax/src/lib.rs
index 754858900..20f25db71 100644
--- a/vendor/regex-syntax/src/lib.rs
+++ b/vendor/regex-syntax/src/lib.rs
@@ -157,6 +157,11 @@ The following features are available:
[Unicode text segmentation algorithms](https://www.unicode.org/reports/tr29/).
This enables using classes like `\p{gcb=Extend}`, `\p{wb=Katakana}` and
`\p{sb=ATerm}`.
+* **arbitrary** -
+ Enabling this feature introduces a public dependency on the
+ [`arbitrary`](https://crates.io/crates/arbitrary)
+ crate. Namely, it implements the `Arbitrary` trait from that crate for the
+ [`Ast`](crate::ast::Ast) type. This feature is disabled by default.
*/
#![no_std]
@@ -317,6 +322,9 @@ pub fn is_escapeable_character(c: char) -> bool {
// escapeable, \< and \> will result in a parse error. Thus, we can
// turn them into something else in the future without it being a
// backwards incompatible change.
+ //
+ // OK, now we support \< and \>, and we need to retain them as *not*
+ // escapeable here since the escape sequence is significant.
'<' | '>' => false,
_ => true,
}
@@ -364,7 +372,7 @@ pub fn try_is_word_character(
/// Returns true if and only if the given character is an ASCII word character.
///
/// An ASCII word character is defined by the following character class:
-/// `[_0-9a-zA-Z]'.
+/// `[_0-9a-zA-Z]`.
pub fn is_word_byte(c: u8) -> bool {
match c {
b'_' | b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' => true,