Lines Matching refs:T

102     pub fn into_vec<T, A: Allocator>(b: Box<[T], A>) -> Vec<T, A> {  in into_vec()  argument
106 Vec::from_raw_parts_in(b as *mut T, len, len, alloc) in into_vec()
112 pub fn to_vec<T: ConvertVec, A: Allocator>(s: &[T], alloc: A) -> Vec<T, A> { in to_vec() argument
113 T::to_vec(s, alloc) in to_vec()
124 impl<T: Clone> ConvertVec for T { implementation
127 struct DropGuard<'a, T, A: Allocator> { in to_vec()
128 vec: &'a mut Vec<T, A>, in to_vec()
131 impl<'a, T, A: Allocator> Drop for DropGuard<'a, T, A> { in to_vec()
161 impl<T: Copy> ConvertVec for T { implementation
178 impl<T> [T] { implementation
211 T: Ord, in sort()
213 stable_sort(self, T::lt); in sort()
267 F: FnMut(&T, &T) -> Ordering, in sort_by() argument
309 F: FnMut(&T) -> K, in sort_by_key()
356 F: FnMut(&T) -> K, in sort_by_cached_key()
414 pub fn to_vec(&self) -> Vec<T> in to_vec()
416 T: Clone, in to_vec()
438 pub fn to_vec_in<A: Allocator>(&self, alloc: A) -> Vec<T, A> in to_vec_in() argument
440 T: Clone, in to_vec_in()
463 pub fn into_vec<A: Allocator>(self: Box<Self, A>) -> Vec<T, A> { in into_vec() argument
491 pub fn repeat(&self, n: usize) -> Vec<T> in repeat()
493 T: Copy, in repeat()
518 (buf.as_mut_ptr() as *mut T).add(buf.len()), in repeat()
539 (buf.as_mut_ptr() as *mut T).add(buf.len()), in repeat()
709 impl<T: Clone, V: Borrow<[T]>> Concat<T> for [V] {
710 type Output = Vec<T>;
712 fn concat(slice: &Self) -> Vec<T> { in concat() argument
724 impl<T: Clone, V: Borrow<[T]>> Join<&T> for [V] {
725 type Output = Vec<T>;
727 fn join(slice: &Self, sep: &T) -> Vec<T> { in join() argument
747 impl<T: Clone, V: Borrow<[T]>> Join<&[T]> for [V] {
748 type Output = Vec<T>;
750 fn join(slice: &Self, sep: &[T]) -> Vec<T> { in join() argument
774 impl<T, A: Allocator> Borrow<[T]> for Vec<T, A> {
775 fn borrow(&self) -> &[T] { in borrow() argument
781 impl<T, A: Allocator> BorrowMut<[T]> for Vec<T, A> {
782 fn borrow_mut(&mut self) -> &mut [T] { in borrow_mut() argument
791 pub(crate) trait SpecCloneIntoVec<T, A: Allocator> {
792 fn clone_into(&self, target: &mut Vec<T, A>); in clone_into() argument
796 impl<T: Clone, A: Allocator> SpecCloneIntoVec<T, A> for [T] { implementation
797 default fn clone_into(&self, target: &mut Vec<T, A>) { in clone_into() argument
812 impl<T: Copy, A: Allocator> SpecCloneIntoVec<T, A> for [T] { implementation
813 fn clone_into(&self, target: &mut Vec<T, A>) { in clone_into() argument
821 impl<T: Clone> ToOwned for [T] { implementation
822 type Owned = Vec<T>;
824 fn to_owned(&self) -> Vec<T> { in to_owned() argument
829 fn to_owned(&self) -> Vec<T> { in to_owned() argument
833 fn clone_into(&self, target: &mut Vec<T>) { in clone_into() argument
844 fn stable_sort<T, F>(v: &mut [T], mut is_less: F) in stable_sort() argument
846 F: FnMut(&T, &T) -> bool, in stable_sort()
848 if T::IS_ZST { in stable_sort()
853 let elem_alloc_fn = |len: usize| -> *mut T { in stable_sort()
857 unsafe { alloc::alloc(alloc::Layout::array::<T>(len).unwrap_unchecked()) as *mut T } in stable_sort()
860 let elem_dealloc_fn = |buf_ptr: *mut T, len: usize| { in stable_sort()
865 alloc::dealloc(buf_ptr as *mut u8, alloc::Layout::array::<T>(len).unwrap_unchecked()); in stable_sort()