| /rust/pin-init/internal/src/ |
| A D | pinned_drop.rs | 12 assert!(matches!(&toks[0], TokenTree::Ident(i) if i.to_string() == "impl")); in pinned_drop() 16 for (i, tt) in toks.iter().enumerate() { in pinned_drop() 27 if i >= 1 && nesting == 0 { in pinned_drop() 30 matches!(tt, TokenTree::Ident(i) if i.to_string() == "PinnedDrop"), in pinned_drop() 33 pinned_drop_idx = Some(i); in pinned_drop()
|
| A D | pin_data.rs | 31 .skip_while(|tt| !matches!(tt, TokenTree::Ident(i) if i.to_string() == "struct")) in pin_data() 68 if matches!(&tt, TokenTree::Ident(i) if i.to_string() == "struct") { in pin_data() 100 TokenTree::Ident(ref i) in replace_self_and_deny_type_defs() 101 if i.to_string() == "enum" in replace_self_and_deny_type_defs() 102 || i.to_string() == "trait" in replace_self_and_deny_type_defs() 103 || i.to_string() == "struct" in replace_self_and_deny_type_defs() 104 || i.to_string() == "union" in replace_self_and_deny_type_defs() 105 || i.to_string() == "impl" => in replace_self_and_deny_type_defs() 122 TokenTree::Ident(i) if i.to_string() == "Self" => struct_name.clone(), in replace_self_and_deny_type_defs()
|
| A D | helpers.rs | 104 TokenTree::Ident(i) if at_start && i.to_string() == "const" => { in parse_generics()
|
| /rust/kernel/ |
| A D | of.rs | 43 let mut i = 0; in new() variables 44 while i < src.len() { in new() 45 of.compatible[i] = src[i]; in new() 46 i += 1; in new()
|
| A D | acpi.rs | 48 let mut i = 0; in new() variables 49 while i < src.len() { in new() 50 acpi.id[i] = src[i]; in new() 51 i += 1; in new()
|
| A D | device_id.rs | 92 let mut i = 0usize; variables 93 while i < N { 96 raw_ids[i] = unsafe { core::mem::transmute_copy(&ids[i].0) }; 101 raw_ids[i] 105 .write(i); 111 infos[i] = MaybeUninit::new(unsafe { core::ptr::read(&ids[i].1) }); 112 i += 1;
|
| A D | bug.rs | 20 let mut i = 0; variables 21 while i < _FILE.len() { 22 bytes[i] = _FILE[i]; 23 i += 1;
|
| A D | auxiliary.rs | 117 let mut i = 0; in new() variables 118 while i < modname.len() { in new() 119 id.name[i] = modname[i]; in new() 120 i += 1; in new() 124 id.name[i - 1] = b'.'; in new() 128 id.name[i] = name[j]; in new() 129 i += 1; in new()
|
| A D | kunit.rs | 274 let mut i = 0; variables 275 while i < name_u8.len() { 276 ret[i] = name_u8[i] as ::kernel::ffi::c_char; 277 i += 1;
|
| A D | str.rs | 266 let mut i = 0; in from_bytes_with_nul() variables 269 while i + 1 < bytes.len() { in from_bytes_with_nul() 270 if bytes[i] == 0 { in from_bytes_with_nul() 273 i += 1; in from_bytes_with_nul() 674 for i in u8::MIN..=u8::MAX { in test_cstr_display_all_bytes() 675 bytes[i as usize] = i.wrapping_add(1); in test_cstr_display_all_bytes()
|
| A D | cpufreq.rs | 1026 let mut i = 0; variables 1027 while i < src.len() { 1028 dst[i] = src[i]; 1029 i += 1;
|
| /rust/macros/ |
| A D | paste.rs | 91 for i in (0..tokens.len().saturating_sub(3)).rev() { in expand() 94 (&tokens[i + 1], &tokens[i + 2]), in expand() 98 match &tokens[i + 3] { in expand() 100 tokens.splice(i + 3..i + 4, group.stream()); in expand() 105 match &tokens[i] { in expand() 107 tokens.splice(i..i + 1, group.stream()); in expand()
|
| A D | helpers.rs | 78 TokenTree::Ident(i) if i.to_string() == "fn" => { in function_name() 79 if let Some(TokenTree::Ident(i)) = input.next() { in function_name() 80 return Some(i); in function_name()
|
| /rust/kernel/drm/ |
| A D | ioctl.rs | 106 let i: u32 = $crate::uapi::DRM_COMMAND_BASE; 111 ::core::assert!(i == $crate::ioctl::_IOC_NR(cmd)); 114 let i: u32 = i + 1; 149 Ok(i) => i.try_into()
|
| A D | file.rs | 73 Ok(i) => i, in open_callback()
|
| /rust/pin-init/src/ |
| A D | alloc.rs | 43 Err(i) => match i {}, in pin_init() 60 Err(i) => match i {}, in init()
|
| A D | lib.rs | 1330 for i in 0..N { 1331 let init = make_init(i); 1333 let ptr = unsafe { slot.add(i) }; 1339 unsafe { ptr::drop_in_place(ptr::slice_from_raw_parts_mut(slot, i)) }; 1373 for i in 0..N { 1374 let init = make_init(i); 1376 let ptr = unsafe { slot.add(i) }; 1382 unsafe { ptr::drop_in_place(ptr::slice_from_raw_parts_mut(slot, i)) };
|
| /rust/kernel/alloc/ |
| A D | kvec.rs | 452 pub fn remove(&mut self, i: usize) -> Result<T, RemoveError> { in remove() 454 let value_ref = self.get(i).ok_or(RemoveError)?; in remove() 463 let p = unsafe { self.as_mut_ptr().add(i) }; in remove() 469 unsafe { ptr::copy(p.add(1), p, self.len - i - 1) }; in remove() 1310 for i in 0..c.len() { in test_kvec_retain() 1311 vec1.push_within_capacity(i).unwrap(); in test_kvec_retain() 1312 if c[i] { in test_kvec_retain() 1313 vec2.push_within_capacity(i).unwrap(); in test_kvec_retain() 1317 vec1.retain(|i| c[*i]); in test_kvec_retain()
|
| /rust/pin-init/examples/ |
| A D | static_init.rs | 94 for i in 0..thread_count { in main() 108 sleep(Duration::from_millis((i as u64) * 10)); in main()
|
| A D | pthread_mutex.rs | 159 for i in 0..thread_count { in main() 169 sleep(Duration::from_millis((i as u64) * 10)); in main()
|
| A D | mutex.rs | 200 for i in 0..thread_count { in main() 210 sleep(Duration::from_millis((i as u64) * 10)); in main()
|