]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/borrow_check/nll/type_check/mod.rs
Fix remaining compilation issues
[rust.git] / src / librustc_mir / borrow_check / nll / type_check / mod.rs
index 92efd383c3c81b00a442fb551bd84d7d40f13615..e1750af6693c145cd197f2ac33d98acacad781ae 100644 (file)
@@ -540,7 +540,7 @@ fn sanitize_promoted(&mut self, promoted_body_cache: ReadOnlyBodyCache<'b, 'tcx>
         // checker on the promoted MIR, then transfer the constraints back to
         // the main MIR, changing the locations to the provided location.
 
-        let parent_body = mem::replace(&mut self.body, &promoted_body_cache);
+        let parent_body = mem::replace(&mut self.body, promoted_body_cache.body());
 
         // Use new sets of constraints and closure bounds so that we can
         // modify their locations.