diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2019-07-11 19:25:37 +0200 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2019-07-20 05:08:39 +0200 |
| commit | 46f81fc53dbff924aa48e448430f8b8ade8c8d20 (patch) | |
| tree | 198ee021e2dd61365602b347185267272d451e3d /src/librustc_mir/dataflow/impls | |
| parent | ec65db07ef4cf75d0944f43a1bc1f1bd18da6545 (diff) | |
| download | rust-46f81fc53dbff924aa48e448430f8b8ade8c8d20.tar.gz rust-46f81fc53dbff924aa48e448430f8b8ade8c8d20.zip | |
Avoid cloning Place in report_use_of_moved_or_uninitialized and friends
Diffstat (limited to 'src/librustc_mir/dataflow/impls')
| -rw-r--r-- | src/librustc_mir/dataflow/impls/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_mir/dataflow/impls/mod.rs b/src/librustc_mir/dataflow/impls/mod.rs index 065cfe8a4e8..ade732bbb75 100644 --- a/src/librustc_mir/dataflow/impls/mod.rs +++ b/src/librustc_mir/dataflow/impls/mod.rs @@ -309,7 +309,7 @@ impl<'a, 'tcx> BitDenotation<'tcx> for MaybeInitializedPlaces<'a, 'tcx> { // when a call returns successfully, that means we need to set // the bits for that dest_place to 1 (initialized). on_lookup_result_bits(self.tcx, self.body, self.move_data(), - self.move_data().rev_lookup.find(dest_place), + self.move_data().rev_lookup.find(dest_place.as_place_ref()), |mpi| { in_out.insert(mpi); }); } } @@ -367,7 +367,7 @@ impl<'a, 'tcx> BitDenotation<'tcx> for MaybeUninitializedPlaces<'a, 'tcx> { // when a call returns successfully, that means we need to set // the bits for that dest_place to 0 (initialized). on_lookup_result_bits(self.tcx, self.body, self.move_data(), - self.move_data().rev_lookup.find(dest_place), + self.move_data().rev_lookup.find(dest_place.as_place_ref()), |mpi| { in_out.remove(mpi); }); } } @@ -423,7 +423,7 @@ impl<'a, 'tcx> BitDenotation<'tcx> for DefinitelyInitializedPlaces<'a, 'tcx> { // when a call returns successfully, that means we need to set // the bits for that dest_place to 1 (initialized). on_lookup_result_bits(self.tcx, self.body, self.move_data(), - self.move_data().rev_lookup.find(dest_place), + self.move_data().rev_lookup.find(dest_place.as_place_ref()), |mpi| { in_out.insert(mpi); }); } } |
