自分の可変参照を返したいならGATでこうする
use lending_iterator::prelude::*;

fn main() {
let mut v: Vec<String> = ["a", "b", "c", "d", "e"].into_iter().map(str::to_string).collect();
my_iter_mut(&mut v)
.skip(1)
.take(3)
.for_each(|s| s.push('x'));
assert_eq!(v, ["a", "bx", "cx", "dx", "e"]);
}

fn my_iter_mut<'a, T>(slice: &'a mut [T]) -> MyIterMut<'a, T> {
MyIterMut { slice, index: 0 }
}
struct MyIterMut<'a, T> {
slice: &'a mut [T],
index: usize,
}

#[gat]
impl<'a, T> LendingIterator for MyIterMut<'a, T> {
type Item<'next> where Self : 'next = &'next mut T;
fn next(self: &'_ mut MyIterMut<'a, T>) -> Option<Item<'_, Self>> {
if self.index < self.slice.len() {
self.index += 1;
Some(&mut self.slice[self.index - 1])
} else {
None
}
}
}