Skip to main content

restrict_capture_precision

Function restrict_capture_precision 

Source
fn restrict_capture_precision(
    place: Place,
    capture_info: &mut CaptureInfo,
) -> Place
Expand description

Truncate projections so that the following rules are obeyed by the captured place:

  • No Index projections are captured, since arrays are captured completely.
  • No unsafe block is required to capture place.

Returns the truncated place and updated capture mode.