diff options
Diffstat (limited to 'src/libstd/rt/global_heap.rs')
| -rw-r--r-- | src/libstd/rt/global_heap.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstd/rt/global_heap.rs b/src/libstd/rt/global_heap.rs index 094bbd13889..7d54c3faf42 100644 --- a/src/libstd/rt/global_heap.rs +++ b/src/libstd/rt/global_heap.rs @@ -72,9 +72,10 @@ pub unsafe fn realloc_raw(ptr: *mut u8, size: uint) -> *mut u8 { #[lang="exchange_malloc"] #[inline] pub unsafe fn exchange_malloc(size: uint) -> *mut u8 { - // The compiler never calls `exchange_free` on ~ZeroSizeType, so zero-size - // allocations can point to this `static`. It would be incorrect to use a null - // pointer, due to enums assuming types like unique pointers are never null. + // The compiler never calls `exchange_free` on Box<ZeroSizeType>, so + // zero-size allocations can point to this `static`. It would be incorrect + // to use a null pointer, due to enums assuming types like unique pointers + // are never null. static EMPTY: () = (); if size == 0 { |
