]> git.lizzy.rs Git - rust.git/commitdiff
cleanup polonius liveness fact generation: refactor some type names
authorRemy Rakic <remy.rakic@gmail.com>
Mon, 9 Dec 2019 17:59:49 +0000 (18:59 +0100)
committerRemy Rakic <remy.rakic@gmail.com>
Tue, 10 Dec 2019 10:44:44 +0000 (11:44 +0100)
- singular instead of plurals for a relation
- terminology: use "Path"s instead of "MovePath"s

src/librustc_mir/borrow_check/nll/type_check/liveness/polonius.rs

index af7a23629e6d9587a57045792556c716d51ca5dd..49b39c01daa0bb05fe91ab84305f8ff47c0c7c63 100644 (file)
@@ -8,16 +8,16 @@
 
 use super::TypeChecker;
 
-type VarPointRelations = Vec<(Local, LocationIndex)>;
-type MovePathPointRelations = Vec<(MovePathIndex, LocationIndex)>;
+type VarPointRelation = Vec<(Local, LocationIndex)>;
+type PathPointRelation = Vec<(MovePathIndex, LocationIndex)>;
 
 struct UseFactsExtractor<'me> {
-    var_defined: &'me mut VarPointRelations,
-    var_used: &'me mut VarPointRelations,
+    var_defined: &'me mut VarPointRelation,
+    var_used: &'me mut VarPointRelation,
     location_table: &'me LocationTable,
     var_drop_used: &'me mut Vec<(Local, Location)>,
     move_data: &'me MoveData<'me>,
-    path_accessed_at: &'me mut MovePathPointRelations,
+    path_accessed_at: &'me mut PathPointRelation,
 }
 
 // A Visitor to walk through the MIR and extract point-wise facts