Lines Matching defs:packed
199 /// a nested DST's own layout. For example, a `repr(packed(2))` wrapper
1082 /// places a `repr(align)` type inside a `repr(packed)` type, that
1084 /// `repr(packed)`, and inner-type layout rules. The Reference prohibits the
1152 /// `repr(packed(N))`, then `repr_packed` should be set to `Some(N)`,
1208 // `repr(packed(N))` attribute, if any) [1].
1968 // necessary because a packed outer DST can retain a nested
2366 for &(packed, align, _) in leading {
2367 assert!(packed.get().is_power_of_two());
2371 // simultaneous `align` and `packed` modifiers [2].
2372 assert!(align <= packed);
2390 for &(packed, align, prefix) in leading.iter().rev() {
2392 let field_align = alignment.min(packed);
2404 // alignment. Both operands are <= `packed`, so their maximum
2447 for &(packed, align, prefix) in leading.iter().rev() {
2448 assert!(align <= packed);
2454 layout = DstLayout::for_repr_c_struct(Some(align), Some(packed), &[prefix, layout]);
2588 for packed in [1, 2, 4] {
2589 for align in [1, 2, 4].iter().copied().filter(|&align| align <= packed) {
2591 fragments.push((nz(packed), nz(align), prefix));
2622 // alignments, alternating packing, and fully packed trees.
2623 let (packed, align) = match case / 8 {
2625 let packed = rng.gen_range(0..=last);
2626 (packed, rng.gen_range(0..=packed))
2636 let (packed, align) = (alignments[packed], alignments[align]);
2646 5 => packed - 1,
2647 6 => packed + 1,
2651 leading.push((nz(packed), nz(align), prefix));
3205 // `repr(C, packed(2))` wrapper around slice DSTs whose element types
3552 // size formula `2 + round_up(5 + elems, 4)` to a packed outer type.
4013 /// field's alignment, capped by `packed` when present. The resulting
4025 packed: Option<NonZeroUsize>,
4029 || packed.map_or(false, |align| !align.is_power_of_two())
4034 let field_align = field.align.min(packed.unwrap_or(DstLayout::THEORETICAL_MAX_ALIGN));
4116 /// Appends fields in order, with `packed` as an optional cap on field
4125 packed: Option<NonZeroUsize>,
4138 layout = extended_layout(layout, field, packed)?;
4730 let packed: Option<NonZeroUsize> = kani::any();
4732 if let Some(max_align) = packed {
4746 // `packed` attribute, if any) [1].
4753 let field_align = min(field.align, packed.unwrap_or(DstLayout::THEORETICAL_MAX_ALIGN));
4791 let composite = base.extend(field, packed);
4912 let packed: Option<NonZeroUsize> = kani::any();
4914 if let Some(max_align) = packed {
4921 let _ = base.extend(field, packed);