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;
1515use rustc_data_structures:: indexed_vec:: IndexVec ;
1616use std:: fmt:: Debug ;
1717use std:: rc:: Rc ;
18- use std:: ops:: Range ;
1918
2019/// Maps between the various kinds of elements of a region value to
2120/// the internal indices that w use.
@@ -65,11 +64,6 @@ impl RegionValueElements {
6564 PointIndex :: new ( start_index + statement_index)
6665 }
6766
68- /// Range coverting all point indices.
69- fn all_points ( & self ) -> Range < PointIndex > {
70- PointIndex :: new ( 0 ) ..PointIndex :: new ( self . num_points )
71- }
72-
7367 /// Converts a particular `RegionElementIndex` to a location, if
7468 /// that is what it represents. Returns `None` otherwise.
7569 crate fn to_location ( & self , i : PointIndex ) -> Location {
@@ -159,10 +153,7 @@ impl<N: Idx> RegionValues<N> {
159153
160154 /// Adds all the control-flow points to the values for `r`.
161155 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) ;
166157 }
167158
168159 /// 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