add #[rustc_pass_by_value] to more types

This commit is contained in:
lcnr 2022-03-08 15:39:52 +01:00
parent 67b3e81838
commit b8135fd5c8
27 changed files with 165 additions and 152 deletions

View file

@ -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))
}
}