Skip to content

Commit

Permalink
remove assigned_map (appears to be dead code)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Apr 15, 2018
1 parent 56109db commit 517e7fd
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/librustc_mir/dataflow/impls/borrows.rs
Expand Up @@ -58,11 +58,6 @@ pub struct Borrows<'a, 'gcx: 'tcx, 'tcx: 'a> {
/// corresponding `BorrowIndex`.
location_map: FxHashMap<Location, BorrowIndex>,

/// Every borrow in MIR is immediately stored into a place via an
/// assignment statement. This maps each such assigned place back
/// to its borrow-indexes.
assigned_map: FxHashMap<Place<'tcx>, FxHashSet<BorrowIndex>>,

/// Locations which activate borrows.
activation_map: FxHashMap<Location, FxHashSet<BorrowIndex>>,

Expand Down Expand Up @@ -144,7 +139,6 @@ impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx> {
mir,
idx_vec: IndexVec::new(),
location_map: FxHashMap(),
assigned_map: FxHashMap(),
activation_map: FxHashMap(),
region_map: FxHashMap(),
local_map: FxHashMap(),
Expand All @@ -158,7 +152,6 @@ impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx> {
scope_tree,
root_scope,
location_map: visitor.location_map,
assigned_map: visitor.assigned_map,
activation_map: visitor.activation_map,
region_map: visitor.region_map,
local_map: visitor.local_map,
Expand All @@ -170,7 +163,6 @@ impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx> {
mir: &'a Mir<'tcx>,
idx_vec: IndexVec<BorrowIndex, BorrowData<'tcx>>,
location_map: FxHashMap<Location, BorrowIndex>,
assigned_map: FxHashMap<Place<'tcx>, FxHashSet<BorrowIndex>>,
activation_map: FxHashMap<Location, FxHashSet<BorrowIndex>>,
region_map: FxHashMap<Region<'tcx>, FxHashSet<BorrowIndex>>,
local_map: FxHashMap<mir::Local, FxHashSet<BorrowIndex>>,
Expand Down Expand Up @@ -209,7 +201,6 @@ impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx> {
self.location_map.insert(location, idx);

insert(&mut self.activation_map, &activate_location, idx);
insert(&mut self.assigned_map, assigned_place, idx);
insert(&mut self.region_map, &region, idx);
if let Some(local) = root_local(borrowed_place) {
insert(&mut self.local_map, &local, idx);
Expand Down

0 comments on commit 517e7fd

Please sign in to comment.