about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDominik Stolz <d.stolz@tum.de>2023-05-17 16:07:01 +0200
committerDominik Stolz <d.stolz@tum.de>2023-05-23 13:11:23 +0200
commit0e44a38892353409e4a05ccbe22a42524a407dba (patch)
tree1727c71bd851b1b65edd5625cfbeacf0b5fc03bc
parent388071a2cb694dfad0920d302190e207842ff768 (diff)
downloadrust-0e44a38892353409e4a05ccbe22a42524a407dba.tar.gz
rust-0e44a38892353409e4a05ccbe22a42524a407dba.zip
Return promoteds in BodyWithBorrowckFacts
-rw-r--r--compiler/rustc_borrowck/src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs
index dfab36dc0ed..4f1e12c364e 100644
--- a/compiler/rustc_borrowck/src/lib.rs
+++ b/compiler/rustc_borrowck/src/lib.rs
@@ -447,6 +447,7 @@ fn do_mir_borrowck<'tcx>(
         let output_facts = mbcx.polonius_output;
         Some(Box::new(BodyWithBorrowckFacts {
             body: body_owned,
+            promoted,
             borrow_set,
             region_inference_context: regioncx,
             location_table: polonius_input.as_ref().map(|_| location_table_owned),
@@ -470,6 +471,8 @@ fn do_mir_borrowck<'tcx>(
 pub struct BodyWithBorrowckFacts<'tcx> {
     /// A mir body that contains region identifiers.
     pub body: Body<'tcx>,
+    /// The mir bodies of promoteds.
+    pub promoted: IndexVec<Promoted, Body<'tcx>>,
     /// The set of borrows occurring in `body` with data about them.
     pub borrow_set: Rc<BorrowSet<'tcx>>,
     /// Context generated during borrowck, intended to be passed to