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.
rust-regex-lite/0001-Fix-doctest-compilatio...

35 lines
1.2 KiB

From abe3ca24e1b5849372cf3638d13e3f5cf1763faa Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 10 Oct 2023 11:45:42 +0200
Subject: [PATCH] Fix doctest compilation failures on 32-bit architectures
---
src/string.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/string.rs b/src/string.rs
index af0a5b6..ad3e1ba 100644
--- a/src/string.rs
+++ b/src/string.rs
@@ -2063,7 +2063,6 @@ impl<'h, 'n> core::ops::Index<&'n str> for Captures<'h> {
/// This example shows how to create and use `CaptureLocations` in a search.
///
/// ```
-/// # if !cfg!(target_pointer_width = "64") { return; } // see #1041
/// use regex_lite::Regex;
///
/// let re = Regex::new(r"(?<first>\w+)\s+(?<last>\w+)").unwrap();
@@ -2076,7 +2075,9 @@ impl<'h, 'n> core::ops::Index<&'n str> for Captures<'h> {
///
/// // Asking for an invalid capture group always returns None.
/// assert_eq!(None, locs.get(3));
+/// # #[cfg(target_pointer_width = "64")]
/// assert_eq!(None, locs.get(34973498648));
+/// # #[cfg(target_pointer_width = "64")]
/// assert_eq!(None, locs.get(9944060567225171988));
/// ```
#[derive(Clone, Debug)]
--
2.41.0