.collect()
}
- /// Adjusts the closure capture information to ensure that the operations aren't unasfe,
+ /// Adjusts the closure capture information to ensure that the operations aren't unsafe,
/// and that the path can be captured with required capture kind (depending on use in closure,
/// move closure etc.)
///
/// for generators we don't even implement the closure traits
/// really).
///
- /// If we inferred that the closure needs to be FnMut/FnOnce, last element of the returned tuplle
+ /// If we inferred that the closure needs to be FnMut/FnOnce, last element of the returned tuple
/// contains a `Some()` with the `Place` that caused us to do so.
fn process_collected_capture_information(
&self,
let mut closure_kind = ty::ClosureKind::LATTICE_BOTTOM;
let mut origin: Option<(Span, Place<'tcx>)> = None;
- for (place, mut capture_info) in capture_information.into_iter() {
+ for (place, mut capture_info) in capture_information {
// Apply rules for safety before inferring closure kind
let place = restrict_capture_precision(place);
ty::ImmBorrow => false,
});
- // let tcx = self.fcx.tcx;
-
// if this is an implicit deref of an
// upvar, then we need to modify the
// borrow_kind of the upvar to make sure it