Skip to content

Commit f01e271

Browse files
committed
Auto merge of #534 - Amanieu:deprecate-raw-entry, r=Amanieu
Deprecate the raw entry API in favor of `HashTable` It is now moved under the "raw-entry" Cargo feature. For now the raw-entry feature is kept enabled by default because `HashSet` uses it internally, but this will be disabled by default once this is no longer the case.
2 parents f677701 + c4ebfae commit f01e271

File tree

6 files changed

+1849
-1824
lines changed

6 files changed

+1849
-1824
lines changed

Cargo.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bumpalo = { version = "3.13.0", features = ["allocator-api2"] }
4848
rkyv = { version = "0.7.42", features = ["validation"] }
4949

5050
[features]
51-
default = ["default-hasher", "inline-more", "allocator-api2", "equivalent"]
51+
default = ["default-hasher", "inline-more", "allocator-api2", "equivalent", "raw-entry"]
5252

5353
# Enables use of nightly features. This is only guaranteed to work on the latest
5454
# version of nightly Rust.
@@ -64,11 +64,15 @@ rustc-dep-of-std = [
6464
"compiler_builtins",
6565
"alloc",
6666
"rustc-internal-api",
67+
"raw-entry",
6768
]
6869

69-
# Enables the RawTable API.
70+
# Enables the experimental and unsafe RawTable API.
7071
raw = []
7172

73+
# Enables the deprecated RawEntry API.
74+
raw-entry = []
75+
7276
# Provides a default hasher. Currently this is AHash but this is subject to
7377
# change in the future. Note that the default hasher does *not* provide HashDoS
7478
# resistance, unlike the one in the standard library.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ This crate has the following Cargo features:
106106
- `rayon`: Enables rayon parallel iterator support.
107107
- `equivalent`: Allows comparisons to be customized with the `Equivalent` trait.
108108
- `raw`: Enables access to the experimental and unsafe `RawTable` API.
109+
- `raw-entry`: Enables access to the deprecated `RawEntry` API.
109110
- `inline-more`: Adds inline hints to most functions, improving run-time performance at the cost
110111
of compilation time. (enabled by default)
111112
- `default-hasher`: Compiles with ahash as default hasher. (enabled by default)

ci/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ if [ "${CHANNEL}" = "nightly" ]; then
4343
fi
4444

4545
# Make sure we can compile without the default hasher
46-
"${CARGO}" -vv build --target="${TARGET}" --no-default-features
47-
"${CARGO}" -vv build --target="${TARGET}" --release --no-default-features
46+
"${CARGO}" -vv build --target="${TARGET}" --no-default-features --features raw-entry
47+
"${CARGO}" -vv build --target="${TARGET}" --release --no-default-features --features raw-entry
4848

4949
"${CARGO}" -vv ${OP} --target="${TARGET}"
5050
"${CARGO}" -vv ${OP} --target="${TARGET}" --features "${FEATURES}"

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ mod raw;
8686

8787
mod external_trait_impls;
8888
mod map;
89+
#[cfg(feature = "raw-entry")]
90+
mod raw_entry;
8991
#[cfg(feature = "rustc-internal-api")]
9092
mod rustc_entry;
9193
mod scopeguard;

0 commit comments

Comments
 (0)