Skip to content

Commit 63a26c1

Browse files
authored
cargo: ensure that 'perf' doesn't enable 'std' implicitly (#1150)
Features like `perf-literal-multisubstring` ought to have been orthogonal to whether `std` is enabled or not. PR #1150
1 parent dd96592 commit 63a26c1

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

regex-automata/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ perf = ["perf-inline", "perf-literal"]
4545
perf-inline = []
4646
perf-literal = ["perf-literal-substring", "perf-literal-multisubstring"]
4747
perf-literal-substring = ["aho-corasick?/perf-literal", "dep:memchr"]
48-
perf-literal-multisubstring = ["std", "dep:aho-corasick"]
48+
perf-literal-multisubstring = ["dep:aho-corasick"]
4949

5050
# Enables all Unicode features. This expands if new Unicode features are added.
5151
unicode = [

regex-automata/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,10 @@ useful in trying to understand what the meta regex engine is doing.
451451
452452
### Performance features
453453
454+
**Note**:
455+
To get performance benefits offered by the SIMD, `std` must be enabled.
456+
None of the `perf-*` features will enable `std` implicitly.
457+
454458
* **perf** - Enables all of the below features.
455459
* **perf-inline** - When enabled, `inline(always)` is used in (many) strategic
456460
locations to help performance at the expense of longer compile times and

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,10 @@ default are noted.
11831183
11841184
### Performance features
11851185
1186+
**Note**:
1187+
To get performance benefits offered by the SIMD, `std` must be enabled.
1188+
None of the `perf-*` features will enable `std` implicitly.
1189+
11861190
* **perf** -
11871191
Enables all performance related features except for `perf-dfa-full`. This
11881192
feature is enabled by default is intended to cover all reasonable features

0 commit comments

Comments
 (0)