about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2014-05-11 17:17:53 -0400
committerDaniel Micay <danielmicay@gmail.com>2014-05-11 17:41:36 -0400
commitf3de28a920b9a9f2b9418b305dfeb30995d2c6d4 (patch)
tree77aa1249e73c3eadfffaa8c4f4ead1c9daf07a6f /src/libstd/rt
parent034f2180616c301934c3971cac6832aa607a4f08 (diff)
downloadrust-f3de28a920b9a9f2b9418b305dfeb30995d2c6d4.tar.gz
rust-f3de28a920b9a9f2b9418b305dfeb30995d2c6d4.zip
mark rust_malloc/rust_free as unsafe
Support for this was added by 08237cad8d2ce9287aedf99e57384407cc9dc42d.
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/heap.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/rt/heap.rs b/src/libstd/rt/heap.rs
index ffe6dccfa15..fc62b3f12fb 100644
--- a/src/libstd/rt/heap.rs
+++ b/src/libstd/rt/heap.rs
@@ -179,8 +179,8 @@ unsafe fn closure_exchange_malloc(drop_glue: fn(*mut u8), size: uint, align: uin
 #[doc(hidden)]
 #[deprecated]
 #[cfg(stage0, not(test))]
-pub extern "C" fn rust_malloc(size: uint) -> *mut u8 {
-    unsafe { exchange_malloc(size) }
+pub unsafe extern "C" fn rust_malloc(size: uint) -> *mut u8 {
+    exchange_malloc(size)
 }
 
 // hack for libcore
@@ -188,8 +188,8 @@ pub extern "C" fn rust_malloc(size: uint) -> *mut u8 {
 #[doc(hidden)]
 #[deprecated]
 #[cfg(not(stage0), not(test))]
-pub extern "C" fn rust_malloc(size: uint, align: uint) -> *mut u8 {
-    unsafe { exchange_malloc(size, align) }
+pub unsafe extern "C" fn rust_malloc(size: uint, align: uint) -> *mut u8 {
+    exchange_malloc(size, align)
 }
 
 // hack for libcore
@@ -197,8 +197,8 @@ pub extern "C" fn rust_malloc(size: uint, align: uint) -> *mut u8 {
 #[doc(hidden)]
 #[deprecated]
 #[cfg(not(test))]
-pub extern "C" fn rust_free(ptr: *mut u8, size: uint, align: uint) {
-    unsafe { exchange_free(ptr, size, align) }
+pub unsafe extern "C" fn rust_free(ptr: *mut u8, size: uint, align: uint) {
+    exchange_free(ptr, size, align)
 }
 
 #[cfg(test)]