Skip to content

Commit 53a99b8

Browse files
Restore the compatibility function "never_utf"
"never_utf" was a cover over what later became "block_utf_pattern_directive". However fish-shell for a period of time unwisely referenced the master branch of our fork of rust-pcre2; these commits no longer build because this function never_utf no longer exists. Put back never_utf allowing these old commits to build, to aid bisecting.
1 parent d7d8e75 commit 53a99b8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/regex_impl.rs

+9
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,15 @@ impl<W: CodeUnitWidth> RegexBuilder<W> {
304304
self
305305
}
306306

307+
/// Alternate name for block_utf_pattern_directive.
308+
/// This exists because fish-shell unwisely referenced its rust-pcre2 "master"
309+
/// branch in Cargo.toml for a period of time, using the function name "never_utf".
310+
/// We retain this function name for compatibility with these old fish-shell commits,
311+
/// allowing bisecting and similar.
312+
pub fn never_utf(&mut self, yes: bool) -> &mut Self {
313+
self.block_utf_pattern_directive(yes)
314+
}
315+
307316
/// This is now deprecated and is a no-op.
308317
///
309318
/// Previously, this option permitted disabling PCRE2's UTF-8 validity

0 commit comments

Comments
 (0)