diff --git a/Cargo.toml b/Cargo.toml index 3c7a3a79..84e50b1c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,3 +53,6 @@ fuzzing = ["libfuzzer-sys", "checker", "trace-log"] # Enables serde for exposed types. enable-serde = ["serde"] + +# Makes sure crate works with nightly features enabled on the dependencies +nightly = ["hashbrown/nightly", "bumpalo/allocator_api", "allocator-api2/nightly"] diff --git a/src/lib.rs b/src/lib.rs index 539466a8..d65a3330 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,6 +13,7 @@ #![allow(dead_code)] #![allow(clippy::all)] #![no_std] +#![cfg_attr(feature = "nightly", feature(allocator_api))] #[cfg(feature = "std")] extern crate std;