Skip to content

Commit 0a52045

Browse files
DaniPopesfubuloubu
authored andcommitted
fix: use std hashmap with "std" feature (bluealloy#1193)
Also caught by `-Zcheck-cfg`: ``` warning: unexpected `cfg` condition name: `std` --> crates/primitives/src/lib.rs:34:14 | 34 | if #[cfg(std)] { | ^^^ help: found config with similar value: `feature = "std"` | = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows` = help: consider using a Cargo feature instead or adding `println!("cargo:rustc-check-cfg=cfg(std)");` to the top of a `build.rs` = note: see <https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#check-cfg> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default ```
1 parent 3fbc3b7 commit 0a52045

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/primitives/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub use constants::*;
3030
pub use env::*;
3131

3232
cfg_if::cfg_if! {
33-
if #[cfg(std)] {
33+
if #[cfg(feature = "std")] {
3434
pub use std::collections::{hash_map, hash_set, HashMap, HashSet};
3535
use hashbrown as _;
3636
} else {

0 commit comments

Comments
 (0)