Skip to content

Commit a8554b3

Browse files
committed
syntax: fix compilation errors with unicode-perl
When only the unicode-perl feature is enabled, regex-syntax would fail to build. It turns out that 'cargo fix' doesn't actually fix all imports. It looks like it only fixes things that it can build in the current configuration. Fixes #769, Fixes #770
1 parent 0abcada commit a8554b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

regex-syntax/src/unicode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ pub fn perl_space() -> Result<hir::ClassUnicode> {
348348

349349
#[cfg(all(feature = "unicode-perl", not(feature = "unicode-bool")))]
350350
fn imp() -> Result<hir::ClassUnicode> {
351-
use unicode_tables::perl_space::WHITE_SPACE;
351+
use crate::unicode_tables::perl_space::WHITE_SPACE;
352352
Ok(hir_class(WHITE_SPACE))
353353
}
354354

@@ -372,7 +372,7 @@ pub fn perl_digit() -> Result<hir::ClassUnicode> {
372372

373373
#[cfg(all(feature = "unicode-perl", not(feature = "unicode-gencat")))]
374374
fn imp() -> Result<hir::ClassUnicode> {
375-
use unicode_tables::perl_decimal::DECIMAL_NUMBER;
375+
use crate::unicode_tables::perl_decimal::DECIMAL_NUMBER;
376376
Ok(hir_class(DECIMAL_NUMBER))
377377
}
378378

0 commit comments

Comments
 (0)