Function rustc_typeck::check::upvar::restrict_capture_precision [−][src]
fn restrict_capture_precision<'tcx>(
capture_clause: CaptureBy,
place: Place<'tcx>
) -> Place<'tcx>
Expand description
Truncate projections so that following rules are obeyed by the captured place:
- No projections are applied to raw pointers, since these require unsafe blocks. We capture them completely.
- No Index projections are captured, since arrays are captured completely.
- Deref of a box isn’t captured in move clousres.