about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-06-28 20:11:34 +0000
committerbors <bors@rust-lang.org>2014-06-28 20:11:34 +0000
commitfe8bc178014dc2c5badd8443329c179478a40cc4 (patch)
treeb5bfc8f15cc996fe751306924595f81bcc558a27 /src/liballoc
parentde337f3ddfbef800a8cf731e0b593e341af1e3e5 (diff)
parent0dfc90ab15475aa64bea393671463a8e9784ae3f (diff)
downloadrust-fe8bc178014dc2c5badd8443329c179478a40cc4.tar.gz
rust-fe8bc178014dc2c5badd8443329c179478a40cc4.zip
auto merge of #15208 : alexcrichton/rust/snapshots, r=pcwalton
This change registers new snapshots, allowing `*T` to be removed from the language. This is a large breaking change, and it is recommended that if compiler errors are seen that any FFI calls are audited to determine whether they should be actually taking `*mut T`.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/heap.rs11
-rw-r--r--src/liballoc/lib.rs1
-rw-r--r--src/liballoc/owned.rs2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs
index b4d0057778a..589ff8c1de9 100644
--- a/src/liballoc/heap.rs
+++ b/src/liballoc/heap.rs
@@ -99,7 +99,7 @@ pub static mut EMPTY: uint = 12345;
 #[inline]
 unsafe fn exchange_malloc(size: uint, align: uint) -> *mut u8 {
     if size == 0 {
-        &EMPTY as *uint as *mut u8
+        &EMPTY as *const uint as *mut u8
     } else {
         allocate(size, align)
     }
@@ -144,9 +144,10 @@ mod imp {
                       flags: c_int) -> size_t;
         fn je_dallocx(ptr: *mut c_void, flags: c_int);
         fn je_nallocx(size: size_t, flags: c_int) -> size_t;
-        fn je_malloc_stats_print(write_cb: Option<extern "C" fn(cbopaque: *mut c_void, *c_char)>,
+        fn je_malloc_stats_print(write_cb: Option<extern "C" fn(cbopaque: *mut c_void,
+                                                                *const c_char)>,
                                  cbopaque: *mut c_void,
-                                 opts: *c_char);
+                                 opts: *const c_char);
     }
 
     // -lpthread needs to occur after -ljemalloc, the earlier argument isn't enough
@@ -226,7 +227,7 @@ mod imp {
         // a block of memory, so we special case everything under `*uint` to
         // just pass it to malloc, which is guaranteed to align to at least the
         // size of `*uint`.
-        if align < mem::size_of::<*uint>() {
+        if align < mem::size_of::<uint>() {
             libc_heap::malloc_raw(size)
         } else {
             let mut out = 0 as *mut libc::c_void;
@@ -244,7 +245,7 @@ mod imp {
     pub unsafe fn reallocate(ptr: *mut u8, size: uint, align: uint,
                              old_size: uint) -> *mut u8 {
         let new_ptr = allocate(size, align);
-        ptr::copy_memory(new_ptr, ptr as *u8, old_size);
+        ptr::copy_memory(new_ptr, ptr as *const u8, old_size);
         deallocate(ptr, old_size, align);
         return new_ptr;
     }
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index e89a9c019bb..77333b4dc2a 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -70,7 +70,6 @@
 
 #![no_std]
 #![feature(lang_items, phase, unsafe_destructor)]
-#![allow(unknown_features)] // NOTE: remove after a stage0 snap
 
 #[phase(plugin, link)]
 extern crate core;
diff --git a/src/liballoc/owned.rs b/src/liballoc/owned.rs
index 94b8bee8cc9..589adbd41d0 100644
--- a/src/liballoc/owned.rs
+++ b/src/liballoc/owned.rs
@@ -37,7 +37,7 @@ pub static HEAP: () = ();
 
 /// A type that represents a uniquely-owned value.
 #[lang="owned_box"]
-pub struct Box<T>(*T);
+pub struct Box<T>(*mut T);
 
 impl<T: Default> Default for Box<T> {
     fn default() -> Box<T> { box Default::default() }