Skip to content

Commit 9f39e00

Browse files
author
Albin Stjerna
committed
Polonius: Rename parent and var_starts_path
1 parent 6b09477 commit 9f39e00

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/librustc_mir/borrow_check/nll/facts.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ impl AllFactsExt for AllFacts {
6565
var_drop_used,
6666
var_uses_region,
6767
var_drops_region,
68-
var_maybe_initialized_on_exit,
69-
parent,
70-
var_starts_path,
68+
child,
69+
path_belongs_to_var,
7170
initialized_at,
7271
moved_out_at,
7372
])

src/librustc_mir/borrow_check/nll/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ pub(in crate::borrow_check) fn replace_regions_in_mir<'cx, 'tcx>(
7373
// This function populates an AllFacts instance with base facts related to
7474
// MovePaths and needed for the move analysis.
7575
fn populate_polonius_move_facts(all_facts: &mut AllFacts, move_data: &MoveData<'_>, location_table: &LocationTable, body: &Body<'_>) {
76-
all_facts.var_starts_path.extend(move_data.rev_lookup.iter_locals_enumerated().map(|(v, &m)| (v, m)));
76+
all_facts.path_belongs_to_var.extend(move_data.rev_lookup.iter_locals_enumerated().map(|(v, &m)| (m, v)));
7777

78-
for (idx, move_path) in move_data.move_paths.iter_enumerated() {
79-
all_facts.parent.extend(move_path.parents(&move_data.move_paths).iter().map(|&parent| (parent, idx)));
78+
for (child, move_path) in move_data.move_paths.iter_enumerated() {
79+
all_facts.child.extend(move_path.parents(&move_data.move_paths).iter().map(|&parent| (child, parent)));
8080
}
8181

8282
// initialized_at

0 commit comments

Comments
 (0)