/rust/macros/ |
D | quote.rs | 46 tokens = ::std::vec::Vec::new(); 54 let mut ts = ::proc_macro::TokenStream::new(); 61 let mut ts = ::proc_macro::TokenStream::new(); 68 let mut tokens = ::std::vec::Vec::new(); 70 $v.push(::proc_macro::TokenTree::Group(::proc_macro::Group::new( 77 let mut tokens = ::std::vec::Vec::new(); 79 $v.push(::proc_macro::TokenTree::Group(::proc_macro::Group::new( 86 let mut tokens = ::std::vec::Vec::new(); 88 $v.push(::proc_macro::TokenTree::Group(::proc_macro::Group::new( 96 ::proc_macro::Punct::new(':', ::proc_macro::Spacing::Joint) [all …]
|
D | pin_data.rs | 23 let mut errs = TokenStream::new(); in pin_data() 36 res.push(TokenTree::Punct(Punct::new(':', Spacing::Joint))); in pin_data() 37 res.push(TokenTree::Punct(Punct::new(':', Spacing::Alone))); in pin_data() 38 res.push(TokenTree::Punct(Punct::new('<', Spacing::Alone))); in pin_data() 40 res.push(TokenTree::Punct(Punct::new('>', Spacing::Alone))); in pin_data() 119 TokenTree::Group(g) => vec![TokenTree::Group(Group::new( in replace_self_and_deny_type_defs()
|
D | module.rs | 10 let mut values = Vec::new(); in expect_string_array() 32 fn new(module: &'a str) -> Self { in new() method 36 buffer: String::new(), in new() 109 let mut seen_keys = Vec::new(); in parse() 153 let mut ordered_keys: Vec<&str> = Vec::new(); in parse() 176 let mut modinfo = ModInfoBuilder::new(info.name.as_ref()); in module()
|
D | vtable.rs | 30 let mut functions = Vec::new(); in vtable() 31 let mut consts = HashSet::new(); in vtable() 94 tokens.push(TokenTree::Group(Group::new(Delimiter::Brace, new_body))); in vtable()
|
D | paste.rs | 7 let mut segments = Vec::new(); in concat() 46 TokenTree::Ident(Ident::new(&pasted, span.unwrap_or(group_span))) in concat() 66 let mut group = Group::new(delimiter, stream.into_iter().collect()); in expand()
|
D | concat_idents.rs | 21 let res = Ident::new(&format!("{a}{b}"), b.span()); in concat_idents()
|
D | helpers.rs | 127 ty_generics.push(TokenTree::Punct(Punct::new(',', Spacing::Alone))); in parse_generics()
|
/rust/kernel/sync/ |
D | arc.rs | 169 refcount: Opaque::new(unsafe { bindings::REFCOUNT_INIT(1) }), in try_new() 227 unsafe { ArcBorrow::new(self.ptr) } in as_arc_borrow() 240 ManuallyDrop::new(self).ptr.as_ptr() as _ in into_foreign() 246 let inner = NonNull::new(ptr as *mut ArcInner<T>).unwrap(); in borrow() 250 unsafe { ArcBorrow::new(inner) } in borrow() 257 unsafe { Self::from_inner(NonNull::new(ptr as _).unwrap()) } in from_foreign() 409 unsafe fn new(inner: NonNull<ArcInner<T>>) -> Self { in new() method 423 ManuallyDrop::new(unsafe { Arc::from_inner(b.inner) }) in from() 531 refcount: Opaque::new(unsafe { bindings::REFCOUNT_INIT(1) }), in try_new_uninit() 557 let inner = ManuallyDrop::new(self).inner.ptr; in assume_init()
|
D | lock.rs | 103 pub fn new(t: T, name: &'static CStr, key: &'static LockClassKey) -> impl PinInit<Self> { in new() method 105 data: UnsafeCell::new(t), in new() 123 unsafe { Guard::new(self, state) } in lock() 149 ScopeGuard::new(|| unsafe { B::relock(self.lock.state.get(), &mut self.state) }); in do_unlocked() 184 pub(crate) unsafe fn new(lock: &'a Lock<T, B>, state: B::GuardState) -> Self { in new() method
|
D | locked_by.rs | 95 pub fn new<B: Backend>(owner: &Lock<U, B>, data: T) -> Self { in new() method 102 data: UnsafeCell::new(data), in new()
|
D | condvar.rs | 17 $crate::sync::CondVar::new($crate::optional_name!($($name)?), $crate::static_lock_class!()) 95 pub fn new(name: &'static CStr, key: &'static LockClassKey) -> impl PinInit<Self> { in new() method
|
/rust/kernel/ |
D | types.rs | 175 pub fn new(cleanup: impl FnOnce()) -> ScopeGuard<(), impl FnOnce(())> { in new() method 216 pub const fn new(value: T) -> Self { in new() method 218 value: UnsafeCell::new(MaybeUninit::new(value)), in new() 226 value: UnsafeCell::new(MaybeUninit::uninit()), in uninit()
|
D | sync.rs | 30 pub const fn new() -> Self { in new() method 44 static CLASS: $crate::sync::LockClassKey = $crate::sync::LockClassKey::new();
|
D | str.rs | 404 fn new() -> Self { in new() method 555 let mut f = RawFormatter::new(); in try_from_fmt() 600 let mut buf = Vec::new(); in try_from()
|
/rust/alloc/vec/ |
D | set_len_on_drop.rs | 15 pub(super) fn new(len: &'a mut usize) -> Self { in new() method
|
D | mod.rs | 423 pub const fn new() -> Self { in new() method 938 let mut me = ManuallyDrop::new(self); in into_raw_parts() 982 let mut me = ManuallyDrop::new(self); in into_raw_parts_with_alloc() 1220 let me = ManuallyDrop::new(self); in into_boxed_slice() 2347 let mut me = ManuallyDrop::new(self); in leak() 2714 let mut local_len = SetLenOnDrop::new(&mut self.len); in extend_with() 2743 let mut local_len = SetLenOnDrop::new(&mut self.len); in try_extend_with() 2984 let mut me = ManuallyDrop::new(self); in into_iter() 2985 let alloc = ManuallyDrop::new(ptr::read(me.allocator())); in into_iter() 3115 let mut local_len = SetLenOnDrop::new(&mut self.len); in extend_trusted() [all …]
|
D | into_iter.rs | 149 let mut this = ManuallyDrop::new(self); in into_vecdeque() 233 NonZeroUsize::new(n - step_size).map_or(Ok(()), Err) in advance_by() 330 NonZeroUsize::new(n - step_size).map_or(Ok(()), Err) in advance_back_by()
|
/rust/alloc/ |
D | boxed.rs | 219 pub fn new(x: T) -> Self { in new() method 221 Box::new(x) in new() 288 Box::new(x).into() in pin() 449 let layout = Layout::new::<mem::MaybeUninit<T>>(); in new_uninit_in() 486 let layout = Layout::new::<mem::MaybeUninit<T>>(); in try_new_uninit_in() 519 let layout = Layout::new::<mem::MaybeUninit<T>>(); in new_zeroed_in() 556 let layout = Layout::new::<mem::MaybeUninit<T>>(); in try_new_zeroed_in() 1170 unsafe { &mut *mem::ManuallyDrop::new(b).0.as_ptr() } in leak() 1229 Box::new(T::default()) in default() 1437 Box::new(t) in from() [all …]
|
D | README.md | 9 upstream. In general, only additions should be performed (e.g. new 31 what it needs in `alloc` and all the new methods are merged into
|
D | alloc.rs | 188 let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; in alloc_impl() 220 let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; in grow_impl() 311 let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; in shrink()
|
D | raw_vec.rs | 65 pub const NEW: Self = Self::new(); 73 pub const fn new() -> Self { in new() method 169 let me = ManuallyDrop::new(self); in into_box()
|
/rust/kernel/sync/lock/ |
D | spinlock.rs | 16 $crate::sync::SpinLock::new(
|
D | mutex.rs | 16 $crate::sync::Mutex::new(
|
/rust/kernel/init/ |
D | __internal.rs | 203 pub unsafe fn new(ptr: *mut T) -> Self { in new() method 227 pub unsafe fn new() -> Self { in new() method
|
D | macros.rs | 941 let token = unsafe { $crate::init::__internal::OnlyCallFromDrop::new() }; 1196 $crate::init::__internal::DropGuard::new(::core::ptr::addr_of_mut!((*$slot).$field)) 1227 $crate::init::__internal::DropGuard::new(::core::ptr::addr_of_mut!((*$slot).$field)) 1259 $crate::init::__internal::DropGuard::new(::core::ptr::addr_of_mut!((*$slot).$field))
|