Home
last modified time | relevance | path

Searched refs:Vec (Results 1 – 16 of 16) sorted by relevance

/linux-6.12.1/rust/kernel/alloc/
Dvec_ext.rs6 use alloc::vec::Vec;
77 impl<T> VecExt<T> for Vec<T> { implementation
79 let mut v = Vec::new(); in with_capacity()
114 Vec::reserve(self, additional); in reserve()
166 fn destructure<T>(v: &mut Vec<T>) -> (*mut T, usize, usize) { in destructure()
167 let mut tmp = Vec::new(); in destructure()
181 unsafe fn rebuild<T>(v: &mut Vec<T>, ptr: *mut T, len: usize, cap: usize) { in rebuild()
183 let mut tmp = unsafe { Vec::from_raw_parts(ptr, len, cap) }; in rebuild()
/linux-6.12.1/scripts/
Drustdoc_test_gen.rs48 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(); in find_real_path()
56 valid_paths: &mut Vec<PathBuf>, in find_real_path()
115 .collect::<Vec<_>>(); in main()
126 let mut valid_paths: Vec<PathBuf> = Vec::new(); in main()
Dgenerate_rust_target.rs23 Array(Vec<Value>),
27 type Object = Vec<(String, Value)>;
108 TargetSpec(Vec::new()) in new()
/linux-6.12.1/rust/macros/
Dmodule.rs7 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>>,
100 firmware: Option<Vec<String>>,
117 let mut seen_keys = Vec::new(); in parse()
162 let mut ordered_keys: Vec<&str> = Vec::new(); in parse()
Dpin_data.rs60 .collect::<Vec<_>>(); in pin_data()
71 .collect::<Vec<_>>(); in pin_data()
92 struct_name: &Vec<TokenTree>, in replace_self_and_deny_type_defs()
95 ) -> Vec<TokenTree> { in replace_self_and_deny_type_defs()
Dhelpers.rs98 pub(crate) decl_generics: Vec<TokenTree>,
102 pub(crate) impl_generics: Vec<TokenTree>,
107 pub(crate) ty_generics: Vec<TokenTree>,
113 pub(crate) fn parse_generics(input: TokenStream) -> (Generics, Vec<TokenTree>) { in parse_generics()
Dpaste.rs7 let mut segments = Vec::new(); in concat()
57 pub(crate) fn expand(tokens: &mut Vec<TokenTree>) { in expand()
62 let mut stream: Vec<_> = group.stream().into_iter().collect(); in expand()
Dquote.rs46 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();
Dvtable.rs8 let mut tokens: Vec<_> = ts.into_iter().collect(); in vtable()
30 let mut functions = Vec::new(); in vtable()
Dpinned_drop.rs6 let mut toks = input.into_iter().collect::<Vec<_>>(); in pinned_drop()
Dzeroable.rs18 let mut new_impl_generics = Vec::with_capacity(impl_generics.len()); in derive()
/linux-6.12.1/mm/kasan/
Dkasan_test_rust.rs14 let mut v: Vec<u8> = Vec::new(); in kasan_test_rust_uaf()
/linux-6.12.1/samples/rust/
Drust_minimal.rs16 numbers: Vec<i32>,
24 let mut numbers = Vec::new(); in init()
/linux-6.12.1/rust/kernel/
Duaccess.rs14 use alloc::vec::Vec;
133 pub fn read_all(self, buf: &mut Vec<u8>, flags: Flags) -> Result { in read_all()
294 pub fn read_all(mut self, buf: &mut Vec<u8>, flags: Flags) -> Result { in read_all()
Dstr.rs6 use alloc::vec::Vec;
793 buf: Vec<u8>,
806 let mut buf = <Vec<_> as VecExt<_>>::with_capacity(size, GFP_KERNEL)?; in try_from_fmt()
853 let mut buf = Vec::new(); in try_from()
855 <Vec<_> as VecExt<_>>::extend_from_slice(&mut buf, cstr.as_bytes_with_nul(), GFP_KERNEL) in try_from()
Dprelude.rs20 pub use alloc::{boxed::Box, vec::Vec};