Skip to content

Commit

Permalink
Auto merge of #197 - mbrubeck:alloc, r=Amanieu
Browse files Browse the repository at this point in the history
Use the alloc crate on stable Rust

Since the minimum supported Rust version has increased to 1.36 (#193),
the alloc crate no longer requires nightly features.
  • Loading branch information
bors committed Sep 1, 2020
2 parents b834830 + 3046ed2 commit 3587420
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
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

0 comments on commit 3587420

Please sign in to comment.