|
1 | 1 | error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied |
2 | 2 | --> $DIR/not-an-allocator.rs:2:1 |
3 | 3 | | |
| 4 | +LL | #[global_allocator] |
| 5 | + | ------------------- in this procedural macro expansion |
4 | 6 | LL | static A: usize = 0; |
5 | 7 | | ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize` |
6 | 8 | | |
7 | | - = note: required by `std::alloc::GlobalAlloc::alloc` |
| 9 | +note: required by `std::alloc::GlobalAlloc::alloc` |
| 10 | + --> $SRC_DIR/core/src/alloc/global.rs:LL:COL |
| 11 | + | |
| 12 | +LL | unsafe fn alloc(&self, layout: Layout) -> *mut u8; |
| 13 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
8 | 14 | = note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info) |
9 | 15 |
|
10 | 16 | error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied |
11 | 17 | --> $DIR/not-an-allocator.rs:2:1 |
12 | 18 | | |
| 19 | +LL | #[global_allocator] |
| 20 | + | ------------------- in this procedural macro expansion |
13 | 21 | LL | static A: usize = 0; |
14 | 22 | | ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize` |
15 | 23 | | |
16 | | - = note: required by `std::alloc::GlobalAlloc::dealloc` |
| 24 | +note: required by `std::alloc::GlobalAlloc::dealloc` |
| 25 | + --> $SRC_DIR/core/src/alloc/global.rs:LL:COL |
| 26 | + | |
| 27 | +LL | unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout); |
| 28 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
17 | 29 | = note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info) |
18 | 30 |
|
19 | 31 | error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied |
20 | 32 | --> $DIR/not-an-allocator.rs:2:1 |
21 | 33 | | |
| 34 | +LL | #[global_allocator] |
| 35 | + | ------------------- in this procedural macro expansion |
22 | 36 | LL | static A: usize = 0; |
23 | 37 | | ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize` |
24 | 38 | | |
25 | | - = note: required by `std::alloc::GlobalAlloc::realloc` |
| 39 | +note: required by `std::alloc::GlobalAlloc::realloc` |
| 40 | + --> $SRC_DIR/core/src/alloc/global.rs:LL:COL |
| 41 | + | |
| 42 | +LL | unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 { |
| 43 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
26 | 44 | = note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info) |
27 | 45 |
|
28 | 46 | error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied |
29 | 47 | --> $DIR/not-an-allocator.rs:2:1 |
30 | 48 | | |
| 49 | +LL | #[global_allocator] |
| 50 | + | ------------------- in this procedural macro expansion |
31 | 51 | LL | static A: usize = 0; |
32 | 52 | | ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize` |
33 | 53 | | |
34 | | - = note: required by `std::alloc::GlobalAlloc::alloc_zeroed` |
| 54 | +note: required by `std::alloc::GlobalAlloc::alloc_zeroed` |
| 55 | + --> $SRC_DIR/core/src/alloc/global.rs:LL:COL |
| 56 | + | |
| 57 | +LL | unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 { |
| 58 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
35 | 59 | = note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info) |
36 | 60 |
|
37 | 61 | error: aborting due to 4 previous errors |
|
0 commit comments