Skip to content

Some combinations of features fail to build #769

Closed
@Jess3Jane

Description

@Jess3Jane

What version of regex are you using?

1.5.2, or with regex-syntax 0.6.24 with rust version rustc 1.53.0-nightly (42816d61e 2021-04-24

Describe the bug at a high level.

With default features disabled some feature combinations fail to compile.

What are the steps to reproduce the behavior?

For your Cargo.toml:

[package]
name="test"
version = "0.1.0"
edition = "2018"

[dependencies]
regex-syntax = { version = "0.6.24", default-features = false, features = ["unicode-perl"] }

This will also occur if you select the same feature set through regex:

[package]
name="test"
version = "0.1.0"
edition = "2018"

[dependencies]
regex = { version = "1.5.2", default-features = false, features = ["std", "unicode-perl"] }

What is the actual behavior?

  Compiling regex-syntax v0.6.24
error[E0433]: failed to resolve: use of undeclared crate or module `unicode_tables`
   --> /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-syntax-0.6.24/src/unicode.rs:351:13
    |
351 |         use unicode_tables::perl_space::WHITE_SPACE;
    |             ^^^^^^^^^^^^^^ use of undeclared crate or module `unicode_tables`

error[E0433]: failed to resolve: use of undeclared crate or module `unicode_tables`
   --> /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-syntax-0.6.24/src/unicode.rs:375:13
    |
375 |         use unicode_tables::perl_decimal::DECIMAL_NUMBER;
    |             ^^^^^^^^^^^^^^ use of undeclared crate or module `unicode_tables`

error[E0425]: cannot find value `WHITE_SPACE` in this scope
   --> /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-syntax-0.6.24/src/unicode.rs:352:22
    |
352 |         Ok(hir_class(WHITE_SPACE))
    |                      ^^^^^^^^^^^ not found in this scope
    |
help: consider importing this constant
    |
1   | use crate::unicode_tables::perl_space::WHITE_SPACE;
    |

error[E0425]: cannot find value `DECIMAL_NUMBER` in this scope
   --> /home/jess/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-syntax-0.6.24/src/unicode.rs:376:22
    |
376 |         Ok(hir_class(DECIMAL_NUMBER))
    |                      ^^^^^^^^^^^^^^ not found in this scope
    |
help: consider importing this constant
    |
1   | use crate::unicode_tables::perl_decimal::DECIMAL_NUMBER;
    |

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0425, E0433.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `regex-syntax`

What is the expected behavior?

The program should compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions