From 517e7fd2a1bb54da9da5ad121a28f5ea80f72edf Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 6 Apr 2018 11:12:27 -0400 Subject: [PATCH] remove `assigned_map` (appears to be dead code) --- src/librustc_mir/dataflow/impls/borrows.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/librustc_mir/dataflow/impls/borrows.rs b/src/librustc_mir/dataflow/impls/borrows.rs index aa991427be09..e6b8cd6abf06 100644 --- a/src/librustc_mir/dataflow/impls/borrows.rs +++ b/src/librustc_mir/dataflow/impls/borrows.rs @@ -58,11 +58,6 @@ pub struct Borrows<'a, 'gcx: 'tcx, 'tcx: 'a> { /// corresponding `BorrowIndex`. location_map: FxHashMap, - /// 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, FxHashSet>, - /// Locations which activate borrows. activation_map: FxHashMap>, @@ -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(), @@ -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, @@ -170,7 +163,6 @@ impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx> { mir: &'a Mir<'tcx>, idx_vec: IndexVec>, location_map: FxHashMap, - assigned_map: FxHashMap, FxHashSet>, activation_map: FxHashMap>, region_map: FxHashMap, FxHashSet>, local_map: FxHashMap>, @@ -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, ®ion, idx); if let Some(local) = root_local(borrowed_place) { insert(&mut self.local_map, &local, idx);