From 0e44a38892353409e4a05ccbe22a42524a407dba Mon Sep 17 00:00:00 2001 From: Dominik Stolz Date: Wed, 17 May 2023 16:07:01 +0200 Subject: [PATCH] Return promoteds in BodyWithBorrowckFacts --- compiler/rustc_borrowck/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index dfab36dc0ed7..4f1e12c364e4 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>, /// The set of borrows occurring in `body` with data about them. pub borrow_set: Rc>, /// Context generated during borrowck, intended to be passed to