File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/librustc_mir/borrow_check/nll/region_infer Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ impl RegionValueElements {
4747 }
4848 }
4949
50+ /// Converts a `Location` into a `PointIndex`. O(1).
5051 fn point_from_location ( & self , location : Location ) -> PointIndex {
5152 let Location {
5253 block,
@@ -56,8 +57,8 @@ impl RegionValueElements {
5657 PointIndex :: new ( start_index + statement_index)
5758 }
5859
59- /// Converts a particular `RegionElementIndex` to a location, if
60- /// that is what it represents. Returns `None` otherwise .
60+ /// Converts a `PointIndex` back to a location. O(N) where N is
61+ /// the number of blocks; could be faster if we ever cared .
6162 crate fn to_location ( & self , i : PointIndex ) -> Location {
6263 let point_index = i. index ( ) ;
6364
You can’t perform that action at this time.
0 commit comments