This repository was archived by the owner on May 28, 2025. It is now read-only.
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 1
1
//! This file provides API for compiler consumers.
2
2
3
- use std:: rc:: Rc ;
4
-
5
3
use rustc_hir:: def_id:: LocalDefId ;
6
4
use rustc_index:: { IndexSlice , IndexVec } ;
7
5
use rustc_middle:: mir:: { Body , Promoted } ;
@@ -65,10 +63,10 @@ pub struct BodyWithBorrowckFacts<'tcx> {
65
63
/// The mir bodies of promoteds.
66
64
pub promoted : IndexVec < Promoted , Body < ' tcx > > ,
67
65
/// The set of borrows occurring in `body` with data about them.
68
- pub borrow_set : Rc < BorrowSet < ' tcx > > ,
66
+ pub borrow_set : BorrowSet < ' tcx > ,
69
67
/// Context generated during borrowck, intended to be passed to
70
68
/// [`calculate_borrows_out_of_scope_at_location`].
71
- pub region_inference_context : Rc < RegionInferenceContext < ' tcx > > ,
69
+ pub region_inference_context : RegionInferenceContext < ' tcx > ,
72
70
/// The table that maps Polonius points to locations in the table.
73
71
/// Populated when using [`ConsumerOptions::PoloniusInputFacts`]
74
72
/// or [`ConsumerOptions::PoloniusOutputFacts`].
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ use std::cell::RefCell;
20
20
use std:: collections:: BTreeMap ;
21
21
use std:: marker:: PhantomData ;
22
22
use std:: ops:: Deref ;
23
- use std:: rc:: Rc ;
24
23
25
24
use consumers:: { BodyWithBorrowckFacts , ConsumerOptions } ;
26
25
use rustc_data_structures:: fx:: { FxIndexMap , FxIndexSet } ;
@@ -420,8 +419,8 @@ fn do_mir_borrowck<'tcx>(
420
419
Some ( Box :: new ( BodyWithBorrowckFacts {
421
420
body : body_owned,
422
421
promoted,
423
- borrow_set : Rc :: new ( borrow_set ) ,
424
- region_inference_context : Rc :: new ( regioncx) ,
422
+ borrow_set,
423
+ region_inference_context : regioncx,
425
424
location_table : polonius_input. as_ref ( ) . map ( |_| location_table) ,
426
425
input_facts : polonius_input,
427
426
output_facts,
You can’t perform that action at this time.
0 commit comments