
When there are multiple macros in use, it can be difficult to tell which one was responsible for producing an error.
39 lines
1.7 KiB
Text
39 lines
1.7 KiB
Text
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
|
|
--> $DIR/not-an-allocator.rs:2:1
|
|
|
|
|
LL | static A: usize = 0;
|
|
| ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
|
|
|
|
= note: required by `std::alloc::GlobalAlloc::alloc`
|
|
= note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
|
|
--> $DIR/not-an-allocator.rs:2:1
|
|
|
|
|
LL | static A: usize = 0;
|
|
| ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
|
|
|
|
= note: required by `std::alloc::GlobalAlloc::dealloc`
|
|
= note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
|
|
--> $DIR/not-an-allocator.rs:2:1
|
|
|
|
|
LL | static A: usize = 0;
|
|
| ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
|
|
|
|
= note: required by `std::alloc::GlobalAlloc::realloc`
|
|
= note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
|
|
--> $DIR/not-an-allocator.rs:2:1
|
|
|
|
|
LL | static A: usize = 0;
|
|
| ^^^^^^^^^^^^^^^^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
|
|
|
|
= note: required by `std::alloc::GlobalAlloc::alloc_zeroed`
|
|
= note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|