File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
compiler/rustc_borrowck/src Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 11//! This file provides API for compiler consumers.
22
3- use std:: rc:: Rc ;
4-
53use rustc_hir:: def_id:: LocalDefId ;
64use rustc_index:: { IndexSlice , IndexVec } ;
75use rustc_middle:: mir:: { Body , Promoted } ;
@@ -65,10 +63,10 @@ pub struct BodyWithBorrowckFacts<'tcx> {
6563 /// The mir bodies of promoteds.
6664 pub promoted : IndexVec < Promoted , Body < ' tcx > > ,
6765 /// The set of borrows occurring in `body` with data about them.
68- pub borrow_set : Rc < BorrowSet < ' tcx > > ,
66+ pub borrow_set : BorrowSet < ' tcx > ,
6967 /// Context generated during borrowck, intended to be passed to
7068 /// [`calculate_borrows_out_of_scope_at_location`].
71- pub region_inference_context : Rc < RegionInferenceContext < ' tcx > > ,
69+ pub region_inference_context : RegionInferenceContext < ' tcx > ,
7270 /// The table that maps Polonius points to locations in the table.
7371 /// Populated when using [`ConsumerOptions::PoloniusInputFacts`]
7472 /// or [`ConsumerOptions::PoloniusOutputFacts`].
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ use std::cell::RefCell;
2020use std:: collections:: BTreeMap ;
2121use std:: marker:: PhantomData ;
2222use std:: ops:: Deref ;
23- use std:: rc:: Rc ;
2423
2524use consumers:: { BodyWithBorrowckFacts , ConsumerOptions } ;
2625use rustc_data_structures:: fx:: { FxIndexMap , FxIndexSet } ;
@@ -420,8 +419,8 @@ fn do_mir_borrowck<'tcx>(
420419 Some ( Box :: new ( BodyWithBorrowckFacts {
421420 body : body_owned,
422421 promoted,
423- borrow_set : Rc :: new ( borrow_set ) ,
424- region_inference_context : Rc :: new ( regioncx) ,
422+ borrow_set,
423+ region_inference_context : regioncx,
425424 location_table : polonius_input. as_ref ( ) . map ( |_| location_table) ,
426425 input_facts : polonius_input,
427426 output_facts,
You can’t perform that action at this time.
0 commit comments