/kernel/linux/linux-6.6/rust/alloc/ |
H A D | slice.rs | 33 use crate::vec::Vec; 84 // HACK(japaric) needed for the implementation of `Vec::clone` during testing 97 use crate::vec::Vec; 102 pub fn into_vec<T, A: Allocator>(b: Box<[T], A>) -> Vec<T, A> { in into_vec() 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() 118 fn to_vec<A: Allocator>(s: &[Self], alloc: A) -> Vec<Self, A> in to_vec() 126 default fn to_vec<A: Allocator>(s: &[Self], alloc: A) -> Vec<Self, A> { 128 vec: &'a mut Vec<T, A>, 141 let mut vec = Vec [all...] |
H A D | lib.rs | 283 hc64.to_le_bytes().into_iter().chain(0u8..8).collect::<crate::vec::Vec<u8>>();
|
H A D | boxed.rs | 181 use crate::vec::Vec; 1541 /// `Vec`'s allocation. 1689 impl<T, const N: usize> TryFrom<Vec<T>> for Box<[T; N]> { 1690 type Error = Vec<T>; 1692 /// Attempts to convert a `Vec<T>` into a `Box<[T; N]>`. 1694 /// Like [`Vec::into_boxed_slice`], this is in-place if `vec.capacity() == N`, 1699 /// Returns the original `Vec<T>` in the `Err` variant if 1710 fn try_from(vec: Vec<T>) -> Result<Self, Self::Error> { in try_from() 2039 iter.into_iter().collect::<Vec<_>>().into_boxed_slice() in from_iter()
|
/kernel/linux/linux-6.6/rust/alloc/vec/ |
H A D | partial_eq.rs | 7 use super::Vec; 25 __impl_slice_eq1! { [A1: Allocator, A2: Allocator] Vec<T, A1>, Vec<U, A2>, #[stable(feature = "rust1", since = "1.0.0")] } 26 __impl_slice_eq1! { [A: Allocator] Vec<T, A>, &[U], #[stable(feature = "rust1", since = "1.0.0")] } 27 __impl_slice_eq1! { [A: Allocator] Vec<T, A>, &mut [U], #[stable(feature = "rust1", since = "1.0.0")] } 28 __impl_slice_eq1! { [A: Allocator] &[T], Vec<U, A>, #[stable(feature = "partialeq_vec_for_ref_slice", since = "1.46.0")] } 29 __impl_slice_eq1! { [A: Allocator] &mut [T], Vec<U, A>, #[stable(feature = "partialeq_vec_for_ref_slice", since = "1.46.0")] } 30 __impl_slice_eq1! { [A: Allocator] Vec<T, A>, [U], #[stable(feature = "partialeq_vec_for_slice", since = "1.48.0")] } 31 __impl_slice_eq1! { [A: Allocator] [T], Vec<U, A>, #[stable(feature = "partialeq_vec_for_slice", since = "1.48.0")] } 33 __impl_slice_eq1! { [A: Allocator] Cow<'_, [T]>, Vec< [all...] |
H A D | mod.rs | 4 //! `Vec<T>`. 13 //! You can explicitly create a [`Vec`] with [`Vec::new`]: 16 //! let v: Vec<i32> = Vec::new(); 22 //! let v: Vec<i32> = vec![]; 54 //! [`push`]: Vec::push 150 /// A contiguous growable array type, written as `Vec<T>`, short for 'vector'. 155 /// let mut vec = Vec::new(); 181 /// let vec2 = Vec 399 pub struct Vec<T, #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator = Global> { global() structure names 408 impl<T> Vec<T> { global() impls 648 impl<T, A: Allocator> Vec<T, A> { global() impls 2481 impl<T: Clone, A: Allocator> Vec<T, A> { global() impls 2643 impl<T, A: Allocator, const N: usize> Vec<[T; N], A> { global() impls 2688 impl<T: Clone, A: Allocator> Vec<T, A> { global() impls 2750 impl<T: PartialEq, A: Allocator> Vec<T, A> { global() impls 3029 impl<T, A: Allocator> Vec<T, A> { global() impls [all...] |
H A D | spec_extend.rs | 8 use super::{IntoIter, Vec}; 10 // Specialization trait used for Vec::extend 16 // Specialization trait used for Vec::try_extend 22 impl<T, I, A: Allocator> SpecExtend<T, I> for Vec<T, A> 31 impl<T, I, A: Allocator> TrySpecExtend<T, I> for Vec<T, A> 41 impl<T, I, A: Allocator> SpecExtend<T, I> for Vec<T, A> 50 impl<T, I, A: Allocator> TrySpecExtend<T, I> for Vec<T, A> 60 impl<T, A: Allocator> SpecExtend<T, IntoIter<T>> for Vec<T, A> { 69 impl<T, A: Allocator> TrySpecExtend<T, IntoIter<T>> for Vec<T, A> { 80 impl<'a, T: 'a, I, A: Allocator> SpecExtend<&'a T, I> for Vec< [all...] |
H A D | extract_if.rs | 7 use super::Vec; 11 /// This struct is created by [`Vec::extract_if`]. 33 pub(super) vec: &'a mut Vec<T, A>,
|
H A D | drain.rs | 10 use super::Vec; 12 /// A draining iterator for `Vec<T>`. 14 /// This `struct` is created by [`Vec::drain`]. 35 pub(super) vec: NonNull<Vec<T, A>>, 71 /// Keep unyielded elements in the source `Vec`. in fmt() 178 /// Moves back the un-`Drain`ed elements to restore the original `Vec`. in drop() 207 // this can be achieved by manipulating the Vec length instead of moving values out from `iter`. in drop()
|
H A D | into_iter.rs | 24 /// This `struct` is created by the `into_iter` method on [`Vec`](super::Vec) 111 /// # let mut into_iter = Vec::<u8>::with_capacity(10).into_iter(); in fmt() 112 /// let mut into_iter = std::mem::replace(&mut into_iter, Vec::new().into_iter()); in fmt() 151 // SAFETY: This allocation originally came from a `Vec`, so it passes in fmt() 283 // `Vec<T>`, so `i` cannot overflow an `isize`, and the `self.ptr.add(i)` in __iterator_get_unchecked() 284 // is guaranteed to pointer to an element of the `Vec<T>` and in __iterator_get_unchecked() 361 super::Vec::new_in(Default::default()).into_iter() in default()
|
/kernel/linux/linux-6.6/rust/macros/ |
H A D | module.rs | 7 fn expect_string_array(it: &mut token_stream::IntoIter) -> Vec<String> { in expect_string_array() 10 let mut values = Vec::new(); in expect_string_array() 99 alias: Option<Vec<String>>, 109 let mut seen_keys = Vec::new(); in parse() 153 let mut ordered_keys: Vec<&str> = Vec::new(); in parse()
|
H A D | pin_data.rs | 59 .collect::<Vec<_>>(); 70 .collect::<Vec<_>>(); 90 struct_name: &Vec<TokenTree>, in replace_self_and_deny_type_defs() 93 ) -> Vec<TokenTree> { in replace_self_and_deny_type_defs()
|
H A D | helpers.rs | 74 pub(crate) impl_generics: Vec<TokenTree>, 75 pub(crate) ty_generics: Vec<TokenTree>, 81 pub(crate) fn parse_generics(input: TokenStream) -> (Generics, Vec<TokenTree>) {
|
H A D | paste.rs | 7 let mut segments = Vec::new(); in concat() 49 pub(crate) fn expand(tokens: &mut Vec<TokenTree>) { 54 let mut stream: Vec<_> = group.stream().into_iter().collect();
|
H A D | quote.rs | 46 tokens = ::std::vec::Vec::new(); 68 let mut tokens = ::std::vec::Vec::new(); 77 let mut tokens = ::std::vec::Vec::new(); 86 let mut tokens = ::std::vec::Vec::new();
|
H A D | vtable.rs | 8 let mut tokens: Vec<_> = ts.into_iter().collect(); 30 let mut functions = Vec::new();
|
H A D | zeroable.rs | 17 let mut new_impl_generics = Vec::with_capacity(impl_generics.len());
|
H A D | pinned_drop.rs | 6 let mut toks = input.into_iter().collect::<Vec<_>>();
|
/kernel/linux/linux-6.6/samples/rust/ |
H A D | rust_minimal.rs | 16 numbers: Vec<i32>, 24 let mut numbers = Vec::new();
|
/kernel/linux/linux-6.6/scripts/ |
H A D | rustdoc_test_gen.rs | 48 fn find_real_path<'a>(srctree: &Path, valid_paths: &'a mut Vec<PathBuf>, file: &str) -> &'a str { in find_real_path() 51 let potential_components: Vec<&str> = file.strip_suffix("_rs").unwrap().split('_').collect(); 56 valid_paths: &mut Vec<PathBuf>, in find_candidates() 115 .collect::<Vec<_>>(); in main() 126 let mut valid_paths: Vec<PathBuf> = Vec::new(); in main()
|
H A D | generate_rust_target.rs | 26 type Object = Vec<(String, Value)>; 54 TargetSpec(Vec::new()) in new()
|
/kernel/linux/linux-6.6/rust/kernel/ |
H A D | str.rs | 6 use alloc::vec::Vec; 548 buf: Vec<u8>, 561 let mut buf = Vec::try_with_capacity(size)?; 600 let mut buf = Vec::new(); in try_from()
|