about summary refs log tree commit diff
path: root/src/liballoc/boxed.rs
diff options
context:
space:
mode:
authorTim Diekmann <tim.diekmann@3dvision.de>2020-03-03 00:08:24 +0100
committerTim Diekmann <tim.diekmann@3dvision.de>2020-03-03 00:08:24 +0100
commitd8e3557dbae23283f81d7bc45200413dd93ced4a (patch)
treea1131d53f204443a6ab0cdf12f51b52b0f48a361 /src/liballoc/boxed.rs
parentcd5441faf4e56d136d7c05d5eb55b4a41396edaf (diff)
downloadrust-d8e3557dbae23283f81d7bc45200413dd93ced4a.tar.gz
rust-d8e3557dbae23283f81d7bc45200413dd93ced4a.zip
Remove `usable_size` APIs
Diffstat (limited to 'src/liballoc/boxed.rs')
-rw-r--r--src/liballoc/boxed.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 3ac4bd82a3a..4729f0290cf 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -200,7 +200,7 @@ impl<T> Box<T> {
             let ptr = if layout.size() == 0 {
                 NonNull::dangling()
             } else {
-                Global.alloc(layout).unwrap_or_else(|_| alloc::handle_alloc_error(layout)).cast()
+                Global.alloc(layout).unwrap_or_else(|_| alloc::handle_alloc_error(layout)).0.cast()
             };
             Box::from_raw(ptr.as_ptr())
         }
@@ -270,7 +270,7 @@ impl<T> Box<[T]> {
             let ptr = if layout.size() == 0 {
                 NonNull::dangling()
             } else {
-                Global.alloc(layout).unwrap_or_else(|_| alloc::handle_alloc_error(layout)).cast()
+                Global.alloc(layout).unwrap_or_else(|_| alloc::handle_alloc_error(layout)).0.cast()
             };
             Box::from_raw(slice::from_raw_parts_mut(ptr.as_ptr(), len))
         }