]> git.lizzy.rs Git - rust.git/commitdiff
Replace remaining uses of deprecated std::heap with std::alloc
authorMike Hommey <mh@glandium.org>
Sat, 14 Apr 2018 07:47:38 +0000 (16:47 +0900)
committerMike Hommey <mh@glandium.org>
Sat, 14 Apr 2018 07:47:38 +0000 (16:47 +0900)
src/doc/unstable-book/src/language-features/global-allocator.md
src/test/compile-fail/allocator/auxiliary/system-allocator.rs
src/test/compile-fail/allocator/auxiliary/system-allocator2.rs
src/test/compile-fail/allocator/two-allocators.rs
src/test/compile-fail/allocator/two-allocators2.rs
src/test/run-pass/allocator-alloc-one.rs
src/test/run-pass/allocator/auxiliary/custom.rs
src/test/run-pass/regions-mock-trans.rs
src/test/run-pass/thin-lto-global-allocator.rs

index 031b6347445e2af92cc22ab75ca1cb16cad491f8..8f1ba22de8cb1f0b4726fd05b660cd431608a8ab 100644 (file)
@@ -55,7 +55,7 @@ fn main() {
 ```
 
 And that's it! The `#[global_allocator]` attribute is applied to a `static`
-which implements the `Alloc` trait in the `std::heap` module. Note, though,
+which implements the `Alloc` trait in the `std::alloc` module. Note, though,
 that the implementation is defined for `&MyAllocator`, not just `MyAllocator`.
 You may wish, however, to also provide `Alloc for MyAllocator` for other use
 cases.
index 4761dc421d7f75042cb0d45b6901601436ddb467..37e64ba7ea1e094610bf4254b62d47170555fa5a 100644 (file)
@@ -13,7 +13,7 @@
 #![feature(global_allocator, allocator_api)]
 #![crate_type = "rlib"]
 
-use std::heap::System;
+use std::alloc::System;
 
 #[global_allocator]
 static A: System = System;
index 4761dc421d7f75042cb0d45b6901601436ddb467..37e64ba7ea1e094610bf4254b62d47170555fa5a 100644 (file)
@@ -13,7 +13,7 @@
 #![feature(global_allocator, allocator_api)]
 #![crate_type = "rlib"]
 
-use std::heap::System;
+use std::alloc::System;
 
 #[global_allocator]
 static A: System = System;
index b46ba6334a2b43ce60552633953374157cf06b61..5aa6b5d67773f4eae277d18505e1cd1a41839a2b 100644 (file)
@@ -10,7 +10,7 @@
 
 #![feature(global_allocator, allocator_api)]
 
-use std::heap::System;
+use std::alloc::System;
 
 #[global_allocator]
 static A: System = System;
index e342c1f9c44e7e0357fd4979743adf8a71a3bd57..ec5d985a94383cc4de3123fcc7cff1776725b7c3 100644 (file)
@@ -16,7 +16,7 @@
 
 extern crate system_allocator;
 
-use std::heap::System;
+use std::alloc::System;
 
 #[global_allocator]
 static A: System = System;
index 38b8ab50cc7130a45bea58d347da28c44cfa5164..db2a16e065ef57b73d3edf671b83099fb1f1c5f3 100644 (file)
@@ -10,7 +10,7 @@
 
 #![feature(allocator_api, nonnull)]
 
-use std::heap::{Heap, Alloc};
+use std::alloc::{Heap, Alloc};
 
 fn main() {
     unsafe {
index e6a2e22983b25efd4af91bae5c7edea1f785d3e8..91f70aa83e854328e19e53bf2f1a865f7210406a 100644 (file)
@@ -13,7 +13,7 @@
 #![feature(heap_api, allocator_api)]
 #![crate_type = "rlib"]
 
-use std::heap::{GlobalAlloc, System, Layout, Opaque};
+use std::alloc::{GlobalAlloc, System, Layout, Opaque};
 use std::sync::atomic::{AtomicUsize, Ordering};
 
 pub struct A(pub AtomicUsize);
index 3c37243c8b938e4e69ab6c8d33253760e70703a9..28b7ae8fd6300abea8af7e133daf667063d01bbf 100644 (file)
@@ -12,7 +12,7 @@
 
 #![feature(allocator_api)]
 
-use std::heap::{Alloc, Heap, Layout};
+use std::alloc::{Alloc, Heap, Layout};
 use std::ptr::NonNull;
 
 struct arena(());
index 1c15da5469e527c463c85e78539c8ad20a5f4ec0..a0534ff6735a50a166889173b5d720ccef0fb897 100644 (file)
@@ -14,6 +14,6 @@
 #![feature(allocator_api, global_allocator)]
 
 #[global_allocator]
-static A: std::heap::System = std::heap::System;
+static A: std::alloc::System = std::alloc::System;
 
 fn main() {}