Lines Matching refs:DstLayout
33 pub struct DstLayout { struct
105 impl DstLayout { implementation
185 pub const fn new_zst(repr_align: Option<NonZeroUsize>) -> DstLayout { in new_zst() argument
193 DstLayout { in new_zst()
209 pub const fn for_type<T>() -> DstLayout { in for_type() argument
214 DstLayout { in for_type()
233 pub const fn for_unpadded_type<T>() -> DstLayout { in for_unpadded_type() argument
242 pub(crate) const fn for_slice<T>() -> DstLayout { in for_slice() argument
251 DstLayout { in for_slice()
283 fields: &[DstLayout], in for_repr_c_struct() argument
284 ) -> DstLayout { in for_repr_c_struct() argument
285 let mut layout = DstLayout::new_zst(repr_align); in for_repr_c_struct()
341 pub const fn extend(self, field: DstLayout, repr_packed: Option<NonZeroUsize>) -> Self { in extend() argument
358 const_debug_assert!(self.align.get() <= DstLayout::CURRENT_MAX_ALIGN.get()); in extend()
359 const_debug_assert!(field.align.get() <= DstLayout::CURRENT_MAX_ALIGN.get()); in extend()
361 const_debug_assert!(repr_packed.get() <= DstLayout::CURRENT_MAX_ALIGN.get()); in extend()
458 DstLayout { align, size_info, statically_shallow_unpadded } in extend()
515 DstLayout { align: self.align, size_info, statically_shallow_unpadded } in pad_to_align()
914 src: &DstLayout, in project() argument
915 dst: &DstLayout, in project() argument
1109 let layout = DstLayout::for_slice::<u32>(); in test_dst_layout_for_slice()
1130 let base = DstLayout::for_type::<u8>(); in test_dst_layout_extend_sized_with_sized()
1131 let trailing_field = DstLayout::for_type::<elain::Align<$n>>(); in test_dst_layout_extend_sized_with_sized()
1138 let max_align = pack.unwrap_or(DstLayout::CURRENT_MAX_ALIGN); in test_dst_layout_extend_sized_with_sized()
1142 DstLayout { in test_dst_layout_extend_sized_with_sized()
1197 let base = DstLayout::for_type::<u8>(); in test_dst_layout_extend_sized_with_dst()
1201 let trailing_field = DstLayout { in test_dst_layout_extend_sized_with_dst()
1209 let max_align = pack.unwrap_or(DstLayout::CURRENT_MAX_ALIGN).get(); in test_dst_layout_extend_sized_with_dst()
1215 DstLayout { in test_dst_layout_extend_sized_with_dst()
1236 let layout = DstLayout { in test_dst_layout_pad_to_align_with_sized()
1244 DstLayout { in test_dst_layout_pad_to_align_with_sized()
1258 let unpadded = DstLayout { in test_dst_layout_pad_to_align_with_sized()
1267 DstLayout { in test_dst_layout_pad_to_align_with_sized()
1286 let current_max_align = DstLayout::CURRENT_MAX_ALIGN.get(); in test_dst_layout_pad_to_align_with_sized()
1301 let layout = DstLayout { in test_dst_layout_pad_to_align_with_dst()
1332 fn layout<S: Into<SizeInfo>>(s: S, align: usize) -> DstLayout { in test_validate_cast_and_convert_metadata() argument
1333 DstLayout { in test_validate_cast_and_convert_metadata()
1514 (layout, addr, bytes_len, cast_type): (DstLayout, usize, usize, CastType), in test_validate_cast_and_convert_metadata() argument
1650 DstLayout { size_info, align: args.align, statically_shallow_unpadded: false } in test_validate_rust_layout()
1958 impl kani::Arbitrary for DstLayout { implementation
1964 kani::assume(align < DstLayout::THEORETICAL_MAX_ALIGN); in any()
1994 kani::assume(size <= DstLayout::MAX_SIZE); in any()
2008 kani::assume(elem_size < DstLayout::MAX_SIZE); in any()
2009 kani::assume(offset < DstLayout::MAX_SIZE); in any()
2017 let layout: DstLayout = kani::any(); in prove_requires_dynamic_padding()
2038 if unpadded_size >= DstLayout::MAX_SIZE { in prove_requires_dynamic_padding()
2055 let base: DstLayout = kani::any(); in prove_dst_layout_extend()
2056 let field: DstLayout = kani::any(); in prove_dst_layout_extend()
2083 let field_align = min(field.align, packed.unwrap_or(DstLayout::THEORETICAL_MAX_ALIGN)); in prove_dst_layout_extend()
2178 let base: DstLayout = kani::any(); in prove_dst_layout_extend_dst_panics()
2179 let field: DstLayout = kani::any(); in prove_dst_layout_extend_dst_panics()
2196 let layout: DstLayout = kani::any(); in prove_dst_layout_pad_to_align()