File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
src/librustc_mir/borrow_check/nll/region_infer Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ use rustc_data_structures::indexed_vec::Idx;
15
15
use rustc_data_structures:: indexed_vec:: IndexVec ;
16
16
use std:: fmt:: Debug ;
17
17
use std:: rc:: Rc ;
18
- use std:: ops:: Range ;
19
18
20
19
/// Maps between the various kinds of elements of a region value to
21
20
/// the internal indices that w use.
@@ -65,11 +64,6 @@ impl RegionValueElements {
65
64
PointIndex :: new ( start_index + statement_index)
66
65
}
67
66
68
- /// Range coverting all point indices.
69
- fn all_points ( & self ) -> Range < PointIndex > {
70
- PointIndex :: new ( 0 ) ..PointIndex :: new ( self . num_points )
71
- }
72
-
73
67
/// Converts a particular `RegionElementIndex` to a location, if
74
68
/// that is what it represents. Returns `None` otherwise.
75
69
crate fn to_location ( & self , i : PointIndex ) -> Location {
@@ -159,10 +153,7 @@ impl<N: Idx> RegionValues<N> {
159
153
160
154
/// Adds all the control-flow points to the values for `r`.
161
155
crate fn add_all_points ( & mut self , r : N ) {
162
- // FIXME OMG so inefficient. We'll fix later.
163
- for p in self . elements . all_points ( ) {
164
- self . points . add ( r, p) ;
165
- }
156
+ self . points . add_all ( r) ;
166
157
}
167
158
168
159
/// Add all elements in `r_from` to `r_to` (because e.g. `r_to:
You can’t perform that action at this time.
0 commit comments