Skip to content

Commit cc75903

Browse files
committed
std: Delete the alloc_system crate
This commit deletes the `alloc_system` crate from the standard distribution. This unstable crate is no longer needed in the modern stable global allocator world, but rather its functionality is folded directly into the standard library. The standard library was already the only stable location to access this crate, and as a result this should not affect any stable code.
1 parent d393932 commit cc75903

File tree

31 files changed

+450
-508
lines changed

31 files changed

+450
-508
lines changed

src/Cargo.lock

+1-15
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@ dependencies = [
1515
"rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
1616
]
1717

18-
[[package]]
19-
name = "alloc_system"
20-
version = "0.0.0"
21-
dependencies = [
22-
"compiler_builtins 0.0.0",
23-
"core 0.0.0",
24-
"dlmalloc 0.0.0",
25-
"libc 0.0.0",
26-
]
27-
2818
[[package]]
2919
name = "ammonia"
3020
version = "1.1.0"
@@ -2104,7 +2094,6 @@ name = "rustc_asan"
21042094
version = "0.0.0"
21052095
dependencies = [
21062096
"alloc 0.0.0",
2107-
"alloc_system 0.0.0",
21082097
"build_helper 0.1.0",
21092098
"cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
21102099
"compiler_builtins 0.0.0",
@@ -2276,7 +2265,6 @@ name = "rustc_lsan"
22762265
version = "0.0.0"
22772266
dependencies = [
22782267
"alloc 0.0.0",
2279-
"alloc_system 0.0.0",
22802268
"build_helper 0.1.0",
22812269
"cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
22822270
"compiler_builtins 0.0.0",
@@ -2328,7 +2316,6 @@ name = "rustc_msan"
23282316
version = "0.0.0"
23292317
dependencies = [
23302318
"alloc 0.0.0",
2331-
"alloc_system 0.0.0",
23322319
"build_helper 0.1.0",
23332320
"cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
23342321
"compiler_builtins 0.0.0",
@@ -2440,7 +2427,6 @@ name = "rustc_tsan"
24402427
version = "0.0.0"
24412428
dependencies = [
24422429
"alloc 0.0.0",
2443-
"alloc_system 0.0.0",
24442430
"build_helper 0.1.0",
24452431
"cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
24462432
"compiler_builtins 0.0.0",
@@ -2679,11 +2665,11 @@ name = "std"
26792665
version = "0.0.0"
26802666
dependencies = [
26812667
"alloc 0.0.0",
2682-
"alloc_system 0.0.0",
26832668
"build_helper 0.1.0",
26842669
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
26852670
"compiler_builtins 0.0.0",
26862671
"core 0.0.0",
2672+
"dlmalloc 0.0.0",
26872673
"libc 0.0.0",
26882674
"panic_abort 0.0.0",
26892675
"panic_unwind 0.0.0",

src/bootstrap/dist.rs

-1
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,6 @@ impl Step for Src {
859859
"src/build_helper",
860860
"src/dlmalloc",
861861
"src/liballoc",
862-
"src/liballoc_system",
863862
"src/libbacktrace",
864863
"src/libcompiler_builtins",
865864
"src/libcore",

src/ci/docker/wasm32-unknown/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:18.04
22

33
RUN apt-get update && apt-get install -y --no-install-recommends \
44
g++ \

src/liballoc/tests/heap.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use alloc_system::System;
12-
use std::alloc::{Global, Alloc, Layout};
11+
use std::alloc::{Global, Alloc, Layout, System};
1312

1413
/// https://github.com/rust-lang/rust/issues/45955
1514
#[test]

src/liballoc/tests/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
#![feature(allocator_api)]
12-
#![feature(alloc_system)]
1312
#![feature(box_syntax)]
1413
#![feature(drain_filter)]
1514
#![feature(exact_size_is_empty)]
@@ -20,7 +19,6 @@
2019
#![feature(unboxed_closures)]
2120
#![feature(repeat_generic_slice)]
2221

23-
extern crate alloc_system;
2422
extern crate core;
2523
extern crate rand;
2624

src/liballoc_system/Cargo.toml

-19
This file was deleted.

0 commit comments

Comments
 (0)