diff options
| author | bors <bors@rust-lang.org> | 2014-05-22 01:06:25 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-22 01:06:25 -0700 |
| commit | 022a7b3cfb8014f79c79ba85a8273d16cda6e423 (patch) | |
| tree | 69f59e3fdf58d2fa67fb10a218562f2b6362be86 /src/libstd | |
| parent | 22e2204c3d6f09f5bd1311d1d0a7b086e19b1b96 (diff) | |
| parent | f1ce693e618dbf4273e0e1af8fd101e15964f5f0 (diff) | |
| download | rust-022a7b3cfb8014f79c79ba85a8273d16cda6e423.tar.gz rust-022a7b3cfb8014f79c79ba85a8273d16cda6e423.zip | |
auto merge of #14322 : thestinger/rust/secret_santa_heap, r=alexcrichton
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/slice.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/slice.rs b/src/libstd/slice.rs index e78122f699d..0838211b9a5 100644 --- a/src/libstd/slice.rs +++ b/src/libstd/slice.rs @@ -109,7 +109,7 @@ use ops::Drop; use option::{None, Option, Some}; use ptr::RawPtr; use ptr; -use rt::heap::{exchange_malloc, deallocate}; +use rt::heap::{allocate, deallocate}; use unstable::finally::try_finally; use vec::Vec; @@ -304,7 +304,7 @@ impl<'a, T: Clone> CloneableVector<T> for &'a [T] { unsafe { // this should pass the real required alignment - let ret = exchange_malloc(size, 8) as *mut RawVec<()>; + let ret = allocate(size, 8) as *mut RawVec<()>; let a_size = mem::size_of::<T>(); let a_size = if a_size == 0 {1} else {a_size}; @@ -968,7 +968,7 @@ mod tests { assert_eq!(v_b[0], 2); assert_eq!(v_b[1], 3); - // Test on exchange heap. + // Test `Box<[T]>` let vec_unique = box [1, 2, 3, 4, 5, 6]; let v_d = vec_unique.slice(1u, 6u).to_owned(); assert_eq!(v_d.len(), 5u); |
