]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/borrow_check/nll.rs
Rollup merge of #69605 - JohnTitor:opt-def-id, r=petrochenkov
[rust.git] / src / librustc_mir / borrow_check / nll.rs
index 101d1856c38f2cf243577e88d1751ce9fc97dfbb..2201abe4b92f998159064c68802982e2589ea261 100644 (file)
@@ -1,6 +1,5 @@
 //! The entry point of the NLL borrow checker.
 
-use rustc::infer::InferCtxt;
 use rustc::mir::{
     BasicBlock, Body, BodyAndCache, ClosureOutlivesSubject, ClosureRegionRequirements, LocalKind,
     Location, Promoted, ReadOnlyBodyAndCache,
@@ -10,6 +9,7 @@
 use rustc_errors::Diagnostic;
 use rustc_hir::def_id::DefId;
 use rustc_index::vec::IndexVec;
+use rustc_infer::infer::InferCtxt;
 use rustc_span::symbol::sym;
 use std::env;
 use std::fmt::Debug;
@@ -92,7 +92,7 @@ fn populate_polonius_move_facts(
     for (child, move_path) in move_data.move_paths.iter_enumerated() {
         all_facts
             .child
-            .extend(move_path.parents(&move_data.move_paths).iter().map(|&parent| (child, parent)));
+            .extend(move_path.parents(&move_data.move_paths).map(|(parent, _)| (child, parent)));
     }
 
     // initialized_at