@@ -306,7 +306,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
306
306
. collect ( )
307
307
}
308
308
309
- /// Adjusts the closure capture information to ensure that the operations aren't unasfe ,
309
+ /// Adjusts the closure capture information to ensure that the operations aren't unsafe ,
310
310
/// and that the path can be captured with required capture kind (depending on use in closure,
311
311
/// move closure etc.)
312
312
///
@@ -319,7 +319,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
319
319
/// for generators we don't even implement the closure traits
320
320
/// really).
321
321
///
322
- /// If we inferred that the closure needs to be FnMut/FnOnce, last element of the returned tuplle
322
+ /// If we inferred that the closure needs to be FnMut/FnOnce, last element of the returned tuple
323
323
/// contains a `Some()` with the `Place` that caused us to do so.
324
324
fn process_collected_capture_information (
325
325
& self ,
@@ -331,7 +331,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
331
331
let mut closure_kind = ty:: ClosureKind :: LATTICE_BOTTOM ;
332
332
let mut origin: Option < ( Span , Place < ' tcx > ) > = None ;
333
333
334
- for ( place, mut capture_info) in capture_information. into_iter ( ) {
334
+ for ( place, mut capture_info) in capture_information {
335
335
// Apply rules for safety before inferring closure kind
336
336
let place = restrict_capture_precision ( place) ;
337
337
@@ -1541,8 +1541,6 @@ impl<'a, 'tcx> InferBorrowKind<'a, 'tcx> {
1541
1541
ty:: ImmBorrow => false ,
1542
1542
} ) ;
1543
1543
1544
- // let tcx = self.fcx.tcx;
1545
-
1546
1544
// if this is an implicit deref of an
1547
1545
// upvar, then we need to modify the
1548
1546
// borrow_kind of the upvar to make sure it
0 commit comments