Skip to content

rustc: Remove ~[T] from the language #14703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions src/liballoc/heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,24 +155,6 @@ unsafe fn closure_exchange_malloc(drop_glue: fn(*mut u8), size: uint, align: uin
alloc as *mut u8
}

// hack for libcore
#[no_mangle]
#[doc(hidden)]
#[deprecated]
#[cfg(not(test))]
pub unsafe extern "C" fn rust_allocate(size: uint, align: uint) -> *mut u8 {
allocate(size, align)
}

// hack for libcore
#[no_mangle]
#[doc(hidden)]
#[deprecated]
#[cfg(not(test))]
pub unsafe extern "C" fn rust_deallocate(ptr: *mut u8, size: uint, align: uint) {
deallocate(ptr, size, align)
}

#[cfg(test)]
mod bench {
extern crate test;
Expand All @@ -184,11 +166,4 @@ mod bench {
box 10
})
}

#[bench]
fn alloc_owned_big(b: &mut Bencher) {
b.iter(|| {
box [10, ..1000]
})
}
}
7 changes: 0 additions & 7 deletions src/libcollections/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,6 @@ impl<'a, S: Writer, T: Hash<S>> Hash<S> for &'a mut [T] {
}
}

impl<S: Writer, T: Hash<S>> Hash<S> for ~[T] {
#[inline]
fn hash(&self, state: &mut S) {
self.as_slice().hash(state);
}
}

impl<S: Writer, T: Hash<S>> Hash<S> for Vec<T> {
#[inline]
fn hash(&self, state: &mut S) {
Expand Down
5 changes: 3 additions & 2 deletions src/libcollections/hash/sip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ mod tests {
use str::Str;
use string::String;
use slice::{Vector, ImmutableVector};
use vec::Vec;

use super::super::{Hash, Writer};
use super::{SipState, hash, hash_with_keys};
Expand Down Expand Up @@ -376,8 +377,8 @@ mod tests {
s
}

fn result_bytes(h: u64) -> ~[u8] {
box [(h >> 0) as u8,
fn result_bytes(h: u64) -> Vec<u8> {
vec![(h >> 0) as u8,
(h >> 8) as u8,
(h >> 16) as u8,
(h >> 24) as u8,
Expand Down
Loading