Skip to content

Commit 4c8e9b9

Browse files
committed
Replace remaining uses of deprecated std::heap with std::alloc
1 parent bd9ff84 commit 4c8e9b9

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

src/doc/unstable-book/src/language-features/global-allocator.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn main() {
5555
```
5656

5757
And that's it! The `#[global_allocator]` attribute is applied to a `static`
58-
which implements the `Alloc` trait in the `std::heap` module. Note, though,
58+
which implements the `Alloc` trait in the `std::alloc` module. Note, though,
5959
that the implementation is defined for `&MyAllocator`, not just `MyAllocator`.
6060
You may wish, however, to also provide `Alloc for MyAllocator` for other use
6161
cases.

src/test/compile-fail/allocator/auxiliary/system-allocator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![feature(global_allocator, allocator_api)]
1414
#![crate_type = "rlib"]
1515

16-
use std::heap::System;
16+
use std::alloc::System;
1717

1818
#[global_allocator]
1919
static A: System = System;

src/test/compile-fail/allocator/auxiliary/system-allocator2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![feature(global_allocator, allocator_api)]
1414
#![crate_type = "rlib"]
1515

16-
use std::heap::System;
16+
use std::alloc::System;
1717

1818
#[global_allocator]
1919
static A: System = System;

src/test/compile-fail/allocator/two-allocators.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#![feature(global_allocator, allocator_api)]
1212

13-
use std::heap::System;
13+
use std::alloc::System;
1414

1515
#[global_allocator]
1616
static A: System = System;

src/test/compile-fail/allocator/two-allocators2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
extern crate system_allocator;
1818

19-
use std::heap::System;
19+
use std::alloc::System;
2020

2121
#[global_allocator]
2222
static A: System = System;

src/test/run-pass/allocator-alloc-one.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#![feature(allocator_api, nonnull)]
1212

13-
use std::heap::{Heap, Alloc};
13+
use std::alloc::{Heap, Alloc};
1414

1515
fn main() {
1616
unsafe {

src/test/run-pass/allocator/auxiliary/custom.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![feature(heap_api, allocator_api)]
1414
#![crate_type = "rlib"]
1515

16-
use std::heap::{GlobalAlloc, System, Layout, Opaque};
16+
use std::alloc::{GlobalAlloc, System, Layout, Opaque};
1717
use std::sync::atomic::{AtomicUsize, Ordering};
1818

1919
pub struct A(pub AtomicUsize);

src/test/run-pass/regions-mock-trans.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#![feature(allocator_api)]
1414

15-
use std::heap::{Alloc, Heap, Layout};
15+
use std::alloc::{Alloc, Heap, Layout};
1616
use std::ptr::NonNull;
1717

1818
struct arena(());

src/test/run-pass/thin-lto-global-allocator.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
#![feature(allocator_api, global_allocator)]
1515

1616
#[global_allocator]
17-
static A: std::heap::System = std::heap::System;
17+
static A: std::alloc::System = std::alloc::System;
1818

1919
fn main() {}

0 commit comments

Comments
 (0)