Searched refs:new_unchecked (Results 1 – 21 of 21) sorted by relevance
| /linux/rust/pin-init/examples/ |
| H A D | linked_list.rs | 36 next: unsafe { Link::new_unchecked(this) }, in new() 37 prev: unsafe { Link::new_unchecked(this) }, in new() 46 prev: list.next.prev().replace(unsafe { Link::new_unchecked(this)}), in insert_next() 47 next: list.next.replace(unsafe { Link::new_unchecked(this)}), in insert_next() 55 next: list.prev.next().replace(unsafe { Link::new_unchecked(this)}), in insert_prev() 56 prev: list.prev.replace(unsafe { Link::new_unchecked(this)}), in insert_prev() 66 Some(unsafe { NonNull::new_unchecked(self.next.as_ptr() as *mut Self) }) in next() 107 unsafe fn new_unchecked(ptr: NonNull<ListHead>) -> Self { in new_unchecked() method 129 unsafe { Link::new_unchecked(self.0.replace(other.0.get())) } in replace()
|
| H A D | mutex.rs | 109 Pin::new_unchecked(CMutexGuard { in lock()
|
| /linux/rust/kernel/ |
| H A D | ptr.rs | 50 Self(unsafe { NonZero::new_unchecked(ALIGN) }) in new() 73 Some(Self(unsafe { NonZero::new_unchecked(align) })) in new_checked()
|
| H A D | alloc.rs | 268 unsafe { NonNull::new_unchecked(ptr) } in dangling_from_layout()
|
| H A D | mm.rs | 147 Some(unsafe { ARef::from_raw(NonNull::new_unchecked(self.as_raw().cast())) }) in mmget_not_zero()
|
| H A D | firmware.rs | 83 Ok(Firmware(unsafe { NonNull::new_unchecked(fw) })) in request_internal()
|
| H A D | regulator.rs | 278 let inner = unsafe { NonNull::new_unchecked(inner) }; in get_internal()
|
| H A D | error.rs | 157 Error(unsafe { NonZeroI32::new_unchecked(errno) }) in from_errno_unchecked()
|
| H A D | scatterlist.rs | 372 let sgt = unsafe { NonNull::new_unchecked(sgt) }; in new()
|
| H A D | auxiliary.rs | 382 Self(unsafe { NonNull::new_unchecked(adev) }), in new()
|
| H A D | rbtree.rs | 508 best_links = Some(unsafe { NonNull::new_unchecked(&mut (*this).links) }); in find_best_match() 522 best_links = Some(unsafe { NonNull::new_unchecked(&mut (*this).links) }); in find_best_match()
|
| /linux/rust/kernel/alloc/ |
| H A D | kbox.rs | 182 Self(unsafe { NonNull::new_unchecked(raw) }, PhantomData) in from_raw() 429 unsafe { Pin::new_unchecked(b) } in from() 538 unsafe { Pin::new_unchecked(Box::from_raw(ptr.cast())) } in from_foreign() 549 unsafe { Pin::new_unchecked(r) } in borrow() 561 unsafe { Pin::new_unchecked(r) } in borrow_mut()
|
| H A D | kvec.rs | 556 unsafe { ArrayLayout::new_unchecked(capacity) } in from_raw_parts() 564 ptr: unsafe { NonNull::new_unchecked(ptr) }, in from_raw_parts() 1159 let layout = unsafe { ArrayLayout::<T>::new_unchecked(len) }; in collect()
|
| H A D | allocator.rs | 197 let page = unsafe { NonNull::new_unchecked(page) }; in to_page()
|
| /linux/rust/pin-init/src/ |
| H A D | alloc.rs | 114 Ok(unsafe { Pin::new_unchecked(this.assume_init()) }) in try_pin_init()
|
| H A D | macros.rs | 975 let pinned = unsafe { ::core::pin::Pin::new_unchecked(self) }; 1034 … $p_field : unsafe { ::core::pin::Pin::new_unchecked(&mut this.$p_field) }, 1081 ::core::pin::Pin::new_unchecked(slot) 1245 $(let $this = unsafe { ::core::ptr::NonNull::new_unchecked(slot) };)?
|
| H A D | __internal.rs | 186 Ok(unsafe { Pin::new_unchecked(this.value.assume_init_mut()) }) in init()
|
| H A D | lib.rs | 1112 let val = unsafe { Pin::new_unchecked(val) }; in __pinned_init()
|
| /linux/rust/kernel/sync/ |
| H A D | lock.rs | 271 unsafe { Pin::new_unchecked(&mut *self.lock.data.get()) } in as_mut()
|
| /linux/rust/proc-macro2/ |
| H A D | parse.rs | 306 crate::Ident::_new_fallback(Ident::new_unchecked(sym, fallback::Span::call_site())); in ident_any() 945 let doc_ident = crate::Ident::_new_fallback(Ident::new_unchecked("doc", fallback_span)); in doc_comment()
|
| H A D | fallback.rs | 786 Ident::new_unchecked(string, span) in new_checked() 789 pub(crate) fn new_unchecked(string: &str, span: Span) -> Self { in new_unchecked() method
|