Skip to content

Commit 1d586b5

Browse files
authoredMar 7, 2025
Rollup merge of rust-lang#136642 - bjorn3:separate_alloctest_crate, r=cuviper
Put the alloc unit tests in a separate alloctests package Same rationale as rust-lang#135937. This PR has some extra complexity though as a decent amount of tests are testing internal implementation details rather than the public api. As such I opted to include the modules containing the types under test using `#[path]` into the alloctests package. This means that those modules still need `#[cfg(test)]`, but the rest of liballoc no longer need it.
2 parents c53af1c + 22d0440 commit 1d586b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+579
-603
lines changed
 

‎compiler/rustc_codegen_cranelift/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ index 7165c3e48af..968552ad435 100644
1212
--- a/library/alloc/Cargo.toml
1313
+++ b/library/alloc/Cargo.toml
1414
@@ -11,7 +11,7 @@ test = { path = "../test" }
15-
edition = "2021"
15+
bench = false
1616

1717
[dependencies]
1818
core = { path = "../core", public = true }
1919
-compiler_builtins = { version = "=0.1.151", features = ['rustc-dep-of-std'] }
2020
+compiler_builtins = { version = "=0.1.151", features = ['rustc-dep-of-std', 'no-f16-f128'] }
2121

22-
[dev-dependencies]
23-
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }
22+
[features]
23+
compiler-builtins-mem = ['compiler_builtins/mem']
2424
--
2525
2.34.1
2626

‎library/Cargo.lock

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ version = "0.0.0"
3030
dependencies = [
3131
"compiler_builtins",
3232
"core",
33-
"rand",
34-
"rand_xorshift",
3533
]
3634

3735
[[package]]
@@ -40,6 +38,14 @@ version = "0.2.21"
4038
source = "registry+https://github.com/rust-lang/crates.io-index"
4139
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
4240

41+
[[package]]
42+
name = "alloctests"
43+
version = "0.0.0"
44+
dependencies = [
45+
"rand",
46+
"rand_xorshift",
47+
]
48+
4349
[[package]]
4450
name = "cc"
4551
version = "1.2.0"

0 commit comments

Comments
 (0)