You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.3 KiB
35 lines
1.3 KiB
1 year ago
|
From fe43117b051983b7869dae45658319becd971534 Mon Sep 17 00:00:00 2001
|
||
|
From: Fabio Valentini <decathorpe@gmail.com>
|
||
|
Date: Sun, 15 Oct 2023 00:59:37 +0200
|
||
|
Subject: [PATCH] regex-automata: fix compilation of doctests on 32-bit
|
||
|
architectures
|
||
|
|
||
|
---
|
||
|
src/util/captures.rs | 3 ++-
|
||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/util/captures.rs b/src/util/captures.rs
|
||
|
index cd3a5f8..05db6a9 100644
|
||
|
--- a/src/util/captures.rs
|
||
|
+++ b/src/util/captures.rs
|
||
|
@@ -433,7 +433,6 @@ impl Captures {
|
||
|
///
|
||
|
/// ```
|
||
|
/// # if cfg!(miri) { return Ok(()); } // miri takes too long
|
||
|
- /// # if !cfg!(target_pointer_width = "64") { return Ok(()); } // see #1039
|
||
|
/// use regex_automata::{nfa::thompson::pikevm::PikeVM, Span, Match};
|
||
|
///
|
||
|
/// let re = PikeVM::new(r"^(?P<first>\pL+)\s+(?P<last>\pL+)$")?;
|
||
|
@@ -445,6 +444,8 @@ impl Captures {
|
||
|
/// assert_eq!(Some(Span::from(6..17)), caps.get_group(2));
|
||
|
/// // Looking for a non-existent capturing group will return None:
|
||
|
/// assert_eq!(None, caps.get_group(3));
|
||
|
+ /// # // literals are too big for 32-bit usize: #1039
|
||
|
+ /// # #[cfg(target_pointer_width = "64")]
|
||
|
/// assert_eq!(None, caps.get_group(9944060567225171988));
|
||
|
///
|
||
|
/// # Ok::<(), Box<dyn std::error::Error>>(())
|
||
|
--
|
||
|
2.41.0
|
||
|
|