Skip to content

Commit 1fa7a21

Browse files
committed
Make libstd depend on the hashbrown crate
1 parent 556fc40 commit 1fa7a21

File tree

5 files changed

+44
-0
lines changed

5 files changed

+44
-0
lines changed

Cargo.lock

+19
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,16 @@ dependencies = [
10661066
"walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
10671067
]
10681068

1069+
[[package]]
1070+
name = "hashbrown"
1071+
version = "0.2.0"
1072+
source = "registry+https://github.com/rust-lang/crates.io-index"
1073+
dependencies = [
1074+
"compiler_builtins 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
1075+
"rustc-std-workspace-alloc 1.0.0",
1076+
"rustc-std-workspace-core 1.0.0",
1077+
]
1078+
10691079
[[package]]
10701080
name = "heck"
10711081
version = "0.3.0"
@@ -2529,6 +2539,13 @@ name = "rustc-serialize"
25292539
version = "0.3.24"
25302540
source = "registry+https://github.com/rust-lang/crates.io-index"
25312541

2542+
[[package]]
2543+
name = "rustc-std-workspace-alloc"
2544+
version = "1.0.0"
2545+
dependencies = [
2546+
"alloc 0.0.0",
2547+
]
2548+
25322549
[[package]]
25332550
name = "rustc-std-workspace-core"
25342551
version = "1.0.0"
@@ -3260,6 +3277,7 @@ dependencies = [
32603277
"core 0.0.0",
32613278
"dlmalloc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
32623279
"fortanix-sgx-abi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
3280+
"hashbrown 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
32633281
"libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)",
32643282
"panic_abort 0.0.0",
32653283
"panic_unwind 0.0.0",
@@ -4103,6 +4121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
41034121
"checksum globset 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4743617a7464bbda3c8aec8558ff2f9429047e025771037df561d383337ff865"
41044122
"checksum handlebars 0.32.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d89ec99d1594f285d4590fc32bac5f75cdab383f1123d504d27862c644a807dd"
41054123
"checksum handlebars 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d82e5750d8027a97b9640e3fefa66bbaf852a35228e1c90790efd13c4b09c166"
4124+
"checksum hashbrown 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "58623735fa622916205f9e0a52a031b25b0e251ddaef47f7cb288444c4410beb"
41064125
"checksum heck 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea04fa3ead4e05e51a7c806fc07271fdbde4e246a6c6d1efd52e72230b771b82"
41074126
"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77"
41084127
"checksum home 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "80dff82fb58cfbbc617fb9a9184b010be0529201553cda50ad04372bc2333aff"

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ rustc-workspace-hack = { path = 'src/tools/rustc-workspace-hack' }
6767
# See comments in `tools/rustc-std-workspace-core/README.md` for what's going on
6868
# here
6969
rustc-std-workspace-core = { path = 'src/tools/rustc-std-workspace-core' }
70+
rustc-std-workspace-alloc = { path = 'src/tools/rustc-std-workspace-alloc' }
7071

7172
[patch."https://github.com/rust-lang/rust-clippy"]
7273
clippy_lints = { path = "src/tools/clippy/clippy_lints" }

src/libstd/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ libc = { version = "0.2.51", default-features = false, features = ['rustc-dep-of
2222
compiler_builtins = { version = "0.1.9" }
2323
profiler_builtins = { path = "../libprofiler_builtins", optional = true }
2424
unwind = { path = "../libunwind" }
25+
hashbrown = { version = "0.2.0", features = ['rustc-dep-of-std'] }
2526
rustc-demangle = { version = "0.1.10", features = ['rustc-dep-of-std'] }
2627
backtrace-sys = { version = "0.1.24", features = ["rustc-dep-of-std"], optional = true }
2728

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "rustc-std-workspace-alloc"
3+
version = "1.0.0"
4+
authors = ["Alex Crichton <[email protected]>"]
5+
license = 'MIT/Apache-2.0'
6+
description = """
7+
Hack for the compiler's own build system
8+
"""
9+
10+
[lib]
11+
path = "lib.rs"
12+
13+
[dependencies]
14+
alloc = { path = "../../liballoc" }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![feature(no_core, alloc)]
2+
#![no_core]
3+
4+
// See rustc-std-workspace-core for why this crate is needed.
5+
6+
// Rename the crate to avoid conflicting with the alloc module in liballoc.
7+
extern crate alloc as foo;
8+
9+
pub use foo::*;

0 commit comments

Comments
 (0)