Skip to main content

## restrict_repr_packed_field_ref_capture

# Function restrict_repr_packed_field_ref_capture

Source

    fn restrict_repr_packed_field_ref_capture<'tcx>(
        place: Place<'tcx>,
        curr_borrow_kind: UpvarCapture,
    ) -> (Place<'tcx>, UpvarCapture)

Expand description

Truncate the capture so that the place being borrowed is in accordance with RFC 1240, which states that it’s unsafe to take a reference into a struct marked `repr(packed)`.