File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -433,7 +433,6 @@ impl Captures {
433
433
///
434
434
/// ```
435
435
/// # if cfg!(miri) { return Ok(()); } // miri takes too long
436
- /// # if !cfg!(target_pointer_width = "64") { return Ok(()); } // see #1039
437
436
/// use regex_automata::{nfa::thompson::pikevm::PikeVM, Span, Match};
438
437
///
439
438
/// let re = PikeVM::new(r"^(?P<first>\pL+)\s+(?P<last>\pL+)$")?;
@@ -445,6 +444,8 @@ impl Captures {
445
444
/// assert_eq!(Some(Span::from(6..17)), caps.get_group(2));
446
445
/// // Looking for a non-existent capturing group will return None:
447
446
/// assert_eq!(None, caps.get_group(3));
447
+ /// # // literals are too big for 32-bit usize: #1039
448
+ /// # #[cfg(target_pointer_width = "64")]
448
449
/// assert_eq!(None, caps.get_group(9944060567225171988));
449
450
///
450
451
/// # Ok::<(), Box<dyn std::error::Error>>(())
Original file line number Diff line number Diff line change @@ -2025,7 +2025,6 @@ impl<'h, 'n> core::ops::Index<&'n str> for Captures<'h> {
2025
2025
/// This example shows how to create and use `CaptureLocations` in a search.
2026
2026
///
2027
2027
/// ```
2028
- /// # if !cfg!(target_pointer_width = "64") { return; } // see #1041
2029
2028
/// use regex::bytes::Regex;
2030
2029
///
2031
2030
/// let re = Regex::new(r"(?<first>\w+)\s+(?<last>\w+)").unwrap();
@@ -2038,7 +2037,10 @@ impl<'h, 'n> core::ops::Index<&'n str> for Captures<'h> {
2038
2037
///
2039
2038
/// // Asking for an invalid capture group always returns None.
2040
2039
/// assert_eq!(None, locs.get(3));
2040
+ /// # // literals are too big for 32-bit usize: #1041
2041
+ /// # #[cfg(target_pointer_width = "64")]
2041
2042
/// assert_eq!(None, locs.get(34973498648));
2043
+ /// # #[cfg(target_pointer_width = "64")]
2042
2044
/// assert_eq!(None, locs.get(9944060567225171988));
2043
2045
/// ```
2044
2046
#[ derive( Clone , Debug ) ]
Original file line number Diff line number Diff line change @@ -2028,7 +2028,6 @@ impl<'h, 'n> core::ops::Index<&'n str> for Captures<'h> {
2028
2028
/// This example shows how to create and use `CaptureLocations` in a search.
2029
2029
///
2030
2030
/// ```
2031
- /// # if !cfg!(target_pointer_width = "64") { return; } // see #1041
2032
2031
/// use regex::Regex;
2033
2032
///
2034
2033
/// let re = Regex::new(r"(?<first>\w+)\s+(?<last>\w+)").unwrap();
@@ -2041,7 +2040,10 @@ impl<'h, 'n> core::ops::Index<&'n str> for Captures<'h> {
2041
2040
///
2042
2041
/// // Asking for an invalid capture group always returns None.
2043
2042
/// assert_eq!(None, locs.get(3));
2043
+ /// # // literals are too big for 32-bit usize: #1041
2044
+ /// # #[cfg(target_pointer_width = "64")]
2044
2045
/// assert_eq!(None, locs.get(34973498648));
2046
+ /// # #[cfg(target_pointer_width = "64")]
2045
2047
/// assert_eq!(None, locs.get(9944060567225171988));
2046
2048
/// ```
2047
2049
#[ derive( Clone , Debug ) ]
You can’t perform that action at this time.
0 commit comments