diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2018-02-27 17:11:14 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2018-03-02 10:48:52 +0100 |
| commit | b74e97cf42e647d87d67a03c134a0494b6aaa811 (patch) | |
| tree | a66e948a4d31dd9681cb6984a3b1fb774bebae4a /src/librustc_mir/dataflow | |
| parent | 878f5b05147480182ea4d8a855acc55bfeb16c22 (diff) | |
| download | rust-b74e97cf42e647d87d67a03c134a0494b6aaa811.tar.gz rust-b74e97cf42e647d87d67a03c134a0494b6aaa811.zip | |
Replace Rc with Lrc for shared data
Diffstat (limited to 'src/librustc_mir/dataflow')
| -rw-r--r-- | src/librustc_mir/dataflow/impls/borrows.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc_mir/dataflow/impls/borrows.rs b/src/librustc_mir/dataflow/impls/borrows.rs index 8ab4035cf4a..533bad18c38 100644 --- a/src/librustc_mir/dataflow/impls/borrows.rs +++ b/src/librustc_mir/dataflow/impls/borrows.rs @@ -22,6 +22,7 @@ use rustc::util::nodemap::{FxHashMap, FxHashSet}; use rustc_data_structures::bitslice::{BitwiseOperator}; use rustc_data_structures::indexed_set::{IdxSet}; use rustc_data_structures::indexed_vec::{Idx, IndexVec}; +use rustc_data_structures::sync::Lrc; use dataflow::{BitDenotation, BlockSets, InitialFlow}; pub use dataflow::indexes::{BorrowIndex, ReserveOrActivateIndex}; @@ -44,7 +45,7 @@ use std::rc::Rc; pub struct Borrows<'a, 'gcx: 'tcx, 'tcx: 'a> { tcx: TyCtxt<'a, 'gcx, 'tcx>, mir: &'a Mir<'tcx>, - scope_tree: Rc<region::ScopeTree>, + scope_tree: Lrc<region::ScopeTree>, root_scope: Option<region::Scope>, /// The fundamental map relating bitvector indexes to the borrows @@ -273,7 +274,7 @@ impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx> { pub fn borrows(&self) -> &IndexVec<BorrowIndex, BorrowData<'tcx>> { &self.borrows } - pub fn scope_tree(&self) -> &Rc<region::ScopeTree> { &self.scope_tree } + pub fn scope_tree(&self) -> &Lrc<region::ScopeTree> { &self.scope_tree } pub fn location(&self, idx: BorrowIndex) -> &Location { &self.borrows[idx].location |
