Lines Matching full:let

169         let me = ManuallyDrop::new(self);  in into_box()
171 let slice = slice::from_raw_parts_mut(me.ptr() as *mut MaybeUninit<T>, len); in into_box()
184 let layout = match Layout::array::<T>(capacity) { in allocate_in()
192 let result = match init { in allocate_in()
196 let ptr = match result { in allocate_in()
218 let layout = Layout::array::<T>(capacity).map_err(|_| CapacityOverflow)?; in try_allocate_in()
220 let result = match init { in try_allocate_in()
224 let ptr = result.map_err(|_| AllocError { layout, non_exhaustive: () })?; in try_allocate_in()
280 let _: () = const { assert!(mem::size_of::<T>() % mem::align_of::<T>() == 0) }; in current_memory()
282 let align = mem::align_of::<T>(); in current_memory()
283 let size = mem::size_of::<T>().unchecked_mul(self.cap); in current_memory()
284 let layout = Layout::from_size_align_unchecked(size, align); in current_memory()
433 let required_cap = len.checked_add(additional).ok_or(CapacityOverflow)?; in grow_amortized()
437 let cap = cmp::max(self.cap * 2, required_cap); in grow_amortized()
438 let cap = cmp::max(Self::MIN_NON_ZERO_CAP, cap); in grow_amortized()
440 let new_layout = Layout::array::<T>(cap); in grow_amortized()
443 let ptr = finish_grow(new_layout, self.current_memory(), &mut self.alloc)?; in grow_amortized()
458 let cap = len.checked_add(additional).ok_or(CapacityOverflow)?; in grow_exact()
459 let new_layout = Layout::array::<T>(cap); in grow_exact()
462 let ptr = finish_grow(new_layout, self.current_memory(), &mut self.alloc)?; in grow_exact()
471 let (ptr, layout) = if let Some(mem) = self.current_memory() { mem } else { return Ok(()) }; in shrink()
473 let _: () = const { assert!(mem::size_of::<T>() % mem::align_of::<T>() == 0) }; in shrink()
483 let ptr = unsafe { in shrink()
486 let new_size = mem::size_of::<T>().unchecked_mul(cap); in shrink()
487 let new_layout = Layout::from_size_align_unchecked(new_size, layout.align()); in shrink()
512 let new_layout = new_layout.map_err(|_| CapacityOverflow)?; in finish_grow()
516 let memory = if let Some((ptr, old_layout)) = current_memory { in finish_grow()
533 if let Some((ptr, layout)) = self.current_memory() { in drop()