Skip to content

Commit 517e7fd

Browse files
committed
remove assigned_map (appears to be dead code)
1 parent 56109db commit 517e7fd

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/librustc_mir/dataflow/impls/borrows.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ pub struct Borrows<'a, 'gcx: 'tcx, 'tcx: 'a> {
5858
/// corresponding `BorrowIndex`.
5959
location_map: FxHashMap<Location, BorrowIndex>,
6060

61-
/// Every borrow in MIR is immediately stored into a place via an
62-
/// assignment statement. This maps each such assigned place back
63-
/// to its borrow-indexes.
64-
assigned_map: FxHashMap<Place<'tcx>, FxHashSet<BorrowIndex>>,
65-
6661
/// Locations which activate borrows.
6762
activation_map: FxHashMap<Location, FxHashSet<BorrowIndex>>,
6863

@@ -144,7 +139,6 @@ impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx> {
144139
mir,
145140
idx_vec: IndexVec::new(),
146141
location_map: FxHashMap(),
147-
assigned_map: FxHashMap(),
148142
activation_map: FxHashMap(),
149143
region_map: FxHashMap(),
150144
local_map: FxHashMap(),
@@ -158,7 +152,6 @@ impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx> {
158152
scope_tree,
159153
root_scope,
160154
location_map: visitor.location_map,
161-
assigned_map: visitor.assigned_map,
162155
activation_map: visitor.activation_map,
163156
region_map: visitor.region_map,
164157
local_map: visitor.local_map,
@@ -170,7 +163,6 @@ impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx> {
170163
mir: &'a Mir<'tcx>,
171164
idx_vec: IndexVec<BorrowIndex, BorrowData<'tcx>>,
172165
location_map: FxHashMap<Location, BorrowIndex>,
173-
assigned_map: FxHashMap<Place<'tcx>, FxHashSet<BorrowIndex>>,
174166
activation_map: FxHashMap<Location, FxHashSet<BorrowIndex>>,
175167
region_map: FxHashMap<Region<'tcx>, FxHashSet<BorrowIndex>>,
176168
local_map: FxHashMap<mir::Local, FxHashSet<BorrowIndex>>,
@@ -209,7 +201,6 @@ impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx> {
209201
self.location_map.insert(location, idx);
210202

211203
insert(&mut self.activation_map, &activate_location, idx);
212-
insert(&mut self.assigned_map, assigned_place, idx);
213204
insert(&mut self.region_map, &region, idx);
214205
if let Some(local) = root_local(borrowed_place) {
215206
insert(&mut self.local_map, &local, idx);

0 commit comments

Comments
 (0)