about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2022-03-08 15:39:52 +0100
committerlcnr <rust@lcnr.de>2022-03-08 15:39:52 +0100
commitb8135fd5c8e51a0578cff82096cbbf7e5d57fdeb (patch)
tree424db470532660fc53ca3239561ad29f137e5fd9 /compiler/rustc_mir_dataflow
parent67b3e8183830c7af4e06a9aa91de4d1be3c860f7 (diff)
downloadrust-b8135fd5c8e51a0578cff82096cbbf7e5d57fdeb.tar.gz
rust-b8135fd5c8e51a0578cff82096cbbf7e5d57fdeb.zip
add `#[rustc_pass_by_value]` to more types
Diffstat (limited to 'compiler/rustc_mir_dataflow')
-rw-r--r--compiler/rustc_mir_dataflow/src/move_paths/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs
index f2b34159382..1af789b4885 100644
--- a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs
+++ b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs
@@ -37,8 +37,8 @@ rustc_index::newtype_index! {
 }
 
 impl MoveOutIndex {
-    pub fn move_path_index(&self, move_data: &MoveData<'_>) -> MovePathIndex {
-        move_data.moves[*self].path
+    pub fn move_path_index(self, move_data: &MoveData<'_>) -> MovePathIndex {
+        move_data.moves[self].path
     }
 }
 
@@ -338,8 +338,8 @@ impl MovePathLookup {
     /// `MovePathIndex`es.
     pub fn iter_locals_enumerated(
         &self,
-    ) -> impl DoubleEndedIterator<Item = (Local, &MovePathIndex)> + ExactSizeIterator {
-        self.locals.iter_enumerated()
+    ) -> impl DoubleEndedIterator<Item = (Local, MovePathIndex)> + ExactSizeIterator + '_ {
+        self.locals.iter_enumerated().map(|(l, &idx)| (l, idx))
     }
 }