Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the alloc crate on stable Rust #197

Merged
merged 2 commits into from Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions Cargo.toml
Expand Up @@ -10,7 +10,6 @@ keywords = ["hash", "no_std", "hashmap", "swisstable"]
categories = ["data-structures", "no-std"]
exclude = [".travis.yml", "bors.toml", "/ci/*"]
edition = "2018"
build = "build.rs"

[dependencies]
# For the default hasher
Expand All @@ -25,9 +24,6 @@ core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core
compiler_builtins = { version = "0.1.2", optional = true }
alloc = { version = "1.0.0", optional = true, package = "rustc-std-workspace-alloc" }

[build-dependencies]
autocfg = "1"

[dev-dependencies]
lazy_static = "1.2"
rand = { version = "0.7.3", features = ["small_rng"] }
Expand Down
9 changes: 0 additions & 9 deletions build.rs

This file was deleted.

13 changes: 1 addition & 12 deletions src/lib.rs
Expand Up @@ -12,15 +12,7 @@
#![no_std]
#![cfg_attr(
feature = "nightly",
feature(
alloc_layout_extra,
allocator_api,
test,
core_intrinsics,
dropck_eyepatch,
min_specialization,
extend_one,
)
feature(test, core_intrinsics, dropck_eyepatch, min_specialization, extend_one)
)]
#![allow(
clippy::doc_markdown,
Expand All @@ -35,11 +27,8 @@
#[macro_use]
extern crate std;

#[cfg(has_extern_crate_alloc)]
#[cfg_attr(test, macro_use)]
extern crate alloc;
#[cfg(not(has_extern_crate_alloc))]
extern crate std as alloc;

#[cfg(feature = "nightly")]
#[cfg(doctest)]
Expand Down