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 {
47
47
}
48
48
}
49
49
50
+ /// Converts a `Location` into a `PointIndex`. O(1).
50
51
fn point_from_location ( & self , location : Location ) -> PointIndex {
51
52
let Location {
52
53
block,
@@ -56,8 +57,8 @@ impl RegionValueElements {
56
57
PointIndex :: new ( start_index + statement_index)
57
58
}
58
59
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 .
61
62
crate fn to_location ( & self , i : PointIndex ) -> Location {
62
63
let point_index = i. index ( ) ;
63
64
You can’t perform that action at this time.
0 commit comments