From fff3b7596af4e8c40dd54be2fb0648327244f097 Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Sun, 4 Oct 2020 17:22:40 -0700 Subject: [PATCH] nll: solve --- compiler/rustc_mir/src/borrow_check/nll.rs | 2 +- compiler/rustc_mir/src/borrow_check/region_infer/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_mir/src/borrow_check/nll.rs b/compiler/rustc_mir/src/borrow_check/nll.rs index a1f8df1922f..aa428328fe9 100644 --- a/compiler/rustc_mir/src/borrow_check/nll.rs +++ b/compiler/rustc_mir/src/borrow_check/nll.rs @@ -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`. diff --git a/compiler/rustc_mir/src/borrow_check/region_infer/mod.rs b/compiler/rustc_mir/src/borrow_check/region_infer/mod.rs index 3dc082a4413..5492e328535 100644 --- a/compiler/rustc_mir/src/borrow_check/region_infer/mod.rs +++ b/compiler/rustc_mir/src/borrow_check/region_infer/mod.rs @@ -548,9 +548,9 @@ impl<'tcx> RegionInferenceContext<'tcx> { &mut self, infcx: &InferCtxt<'_, 'tcx>, body: &Body<'tcx>, - mir_def_id: DefId, polonius_output: Option>, ) -> (Option>, RegionErrors<'tcx>) { + let mir_def_id = body.source.def_id(); self.propagate_constraints(body, infcx.tcx); let mut errors_buffer = RegionErrors::new();