Polonius fact generation: fix path access fact location
This will fix the other move errors false positives: emitting the fact at the start point caused accesses to be at the same point as an initialization fact of the return place of a call on the following block, which emitted an error.
This commit is contained in:
parent
df1ac67913
commit
860f71f141
1 changed files with 1 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ impl UseFactsExtractor<'_> {
|
|||
|
||||
fn insert_path_access(&mut self, path: MovePathIndex, location: Location) {
|
||||
debug!("UseFactsExtractor::insert_path_access({:?}, {:?})", path, location);
|
||||
self.path_accessed_at_base.push((path, self.location_table.start_index(location)));
|
||||
self.path_accessed_at_base.push((path, self.location_to_index(location)));
|
||||
}
|
||||
|
||||
fn place_to_mpi(&self, place: &Place<'_>) -> Option<MovePathIndex> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue