Function rustc_typeck::check::upvar::restrict_capture_precision [−][src]
fn restrict_capture_precision<'tcx>(
place: Place<'tcx>,
curr_mode: UpvarCapture<'tcx>
) -> (Place<'tcx>, UpvarCapture<'tcx>)Expand description
Truncate projections so that 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
placeReturns the truncated place and updated cature mode.
