]> git.lizzy.rs Git - rust.git/commitdiff
nll: solve
authorDylan MacKenzie <ecstaticmorse@gmail.com>
Mon, 5 Oct 2020 00:22:40 +0000 (17:22 -0700)
committerDylan MacKenzie <ecstaticmorse@gmail.com>
Mon, 5 Oct 2020 00:22:40 +0000 (17:22 -0700)
compiler/rustc_mir/src/borrow_check/nll.rs
compiler/rustc_mir/src/borrow_check/region_infer/mod.rs

index a1f8df1922fc239625c52a595eba3a39922a3def..aa428328fe92f7058687a1ab1a464247f5012e6d 100644 (file)
@@ -294,7 +294,7 @@ pub(in crate::borrow_check) fn compute_regions<'cx, 'tcx>(
 
     // Solve the region constraints.
     let (closure_region_requirements, nll_errors) =
-        regioncx.solve(infcx, &body, def_id, polonius_output.clone());
+        regioncx.solve(infcx, &body, polonius_output.clone());
 
     if !nll_errors.is_empty() {
         // Suppress unhelpful extra errors in `infer_opaque_types`.
index 3dc082a4413b3631f58e335217a37b0efd0307c5..5492e328535ef11ce0309cc5f8432b979fdf663e 100644 (file)
@@ -548,9 +548,9 @@ pub(super) fn solve(
         &mut self,
         infcx: &InferCtxt<'_, 'tcx>,
         body: &Body<'tcx>,
-        mir_def_id: DefId,
         polonius_output: Option<Rc<PoloniusOutput>>,
     ) -> (Option<ClosureRegionRequirements<'tcx>>, RegionErrors<'tcx>) {
+        let mir_def_id = body.source.def_id();
         self.propagate_constraints(body, infcx.tcx);
 
         let mut errors_buffer = RegionErrors::new();