Skip to content

Commit

Permalink
Auto merge of #55660 - alexcrichton:cleanup-alloc-system, r=dtolnay,S…
Browse files Browse the repository at this point in the history
…imonSapin

Remove the `alloc_system` crate

In what's hopefully one of the final nails in the coffin of the "old allocator story of yore" this PR deletes the `alloc_system` crate and all traces of it from the compiler. The compiler no longer needs to inject allocator crates anywhere and the `alloc_system` crate has no real reason to exist outside the standard library.

The unstable `alloc_system` crate is folded directly into the standard library where its stable interface, the `System` type, remains the same. All unstable traces of `alloc_system` are removed, however.
  • Loading branch information
bors committed Nov 11, 2018
2 parents 5a2ca1a + cc75903 commit ca79ecd
Show file tree
Hide file tree
Showing 58 changed files with 464 additions and 682 deletions.
16 changes: 1 addition & 15 deletions src/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ dependencies = [
"rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "alloc_system"
version = "0.0.0"
dependencies = [
"compiler_builtins 0.0.0",
"core 0.0.0",
"dlmalloc 0.0.0",
"libc 0.0.0",
]

[[package]]
name = "ammonia"
version = "1.1.0"
Expand Down Expand Up @@ -2104,7 +2094,6 @@ name = "rustc_asan"
version = "0.0.0"
dependencies = [
"alloc 0.0.0",
"alloc_system 0.0.0",
"build_helper 0.1.0",
"cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.0.0",
Expand Down Expand Up @@ -2276,7 +2265,6 @@ name = "rustc_lsan"
version = "0.0.0"
dependencies = [
"alloc 0.0.0",
"alloc_system 0.0.0",
"build_helper 0.1.0",
"cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.0.0",
Expand Down Expand Up @@ -2328,7 +2316,6 @@ name = "rustc_msan"
version = "0.0.0"
dependencies = [
"alloc 0.0.0",
"alloc_system 0.0.0",
"build_helper 0.1.0",
"cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.0.0",
Expand Down Expand Up @@ -2440,7 +2427,6 @@ name = "rustc_tsan"
version = "0.0.0"
dependencies = [
"alloc 0.0.0",
"alloc_system 0.0.0",
"build_helper 0.1.0",
"cmake 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.0.0",
Expand Down Expand Up @@ -2679,11 +2665,11 @@ name = "std"
version = "0.0.0"
dependencies = [
"alloc 0.0.0",
"alloc_system 0.0.0",
"build_helper 0.1.0",
"cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"compiler_builtins 0.0.0",
"core 0.0.0",
"dlmalloc 0.0.0",
"libc 0.0.0",
"panic_abort 0.0.0",
"panic_unwind 0.0.0",
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,6 @@ impl Step for Src {
"src/build_helper",
"src/dlmalloc",
"src/liballoc",
"src/liballoc_system",
"src/libbacktrace",
"src/libcompiler_builtins",
"src/libcore",
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/wasm32-unknown/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:18.04

RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
Expand Down
3 changes: 1 addition & 2 deletions src/liballoc/tests/heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use alloc_system::System;
use std::alloc::{Global, Alloc, Layout};
use std::alloc::{Global, Alloc, Layout, System};

/// https://github.com/rust-lang/rust/issues/45955
#[test]
Expand Down
2 changes: 0 additions & 2 deletions src/liballoc/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
// except according to those terms.

#![feature(allocator_api)]
#![feature(alloc_system)]
#![feature(box_syntax)]
#![feature(drain_filter)]
#![feature(exact_size_is_empty)]
Expand All @@ -20,7 +19,6 @@
#![feature(unboxed_closures)]
#![feature(repeat_generic_slice)]

extern crate alloc_system;
extern crate core;
extern crate rand;

Expand Down
19 changes: 0 additions & 19 deletions src/liballoc_system/Cargo.toml

This file was deleted.

Loading

0 comments on commit ca79ecd

Please sign in to comment.