From b8135fd5c8e51a0578cff82096cbbf7e5d57fdeb Mon Sep 17 00:00:00 2001 From: lcnr Date: Tue, 8 Mar 2022 15:39:52 +0100 Subject: add `#[rustc_pass_by_value]` to more types --- compiler/rustc_mir_dataflow/src/move_paths/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_mir_dataflow') 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 + ExactSizeIterator { - self.locals.iter_enumerated() + ) -> impl DoubleEndedIterator + ExactSizeIterator + '_ { + self.locals.iter_enumerated().map(|(l, &idx)| (l, idx)) } } -- cgit 1.4.1-3-g733a5