Skip to content

Commit

Permalink
syntax: fix compilation errors with unicode-perl
Browse files Browse the repository at this point in the history
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
  • Loading branch information
BurntSushi committed May 1, 2021
1 parent 36dfa75 commit 5d45365
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions regex-syntax/src/unicode.rs
Expand Up @@ -348,7 +348,7 @@ pub fn perl_space() -> Result<hir::ClassUnicode> {

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

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

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

Expand Down

0 comments on commit 5d45365

Please sign in to comment.