1 error[E0308]: method not compatible with trait
2 --> $DIR/issue-37884.rs:16:5
4 16 | / fn next(&'a mut self) -> Option<Self::Item>
5 17 | | //~^ ERROR method not compatible with trait
6 18 | | //~| lifetime mismatch
8 20 | | Some(&mut self.0)
10 | |_____^ lifetime mismatch
12 = note: expected type `fn(&mut RepeatMut<'a, T>) -> std::option::Option<&mut T>`
13 found type `fn(&'a mut RepeatMut<'a, T>) -> std::option::Option<&mut T>`
14 note: the anonymous lifetime #1 defined on the method body at 16:5...
15 --> $DIR/issue-37884.rs:16:5
17 16 | / fn next(&'a mut self) -> Option<Self::Item>
18 17 | | //~^ ERROR method not compatible with trait
19 18 | | //~| lifetime mismatch
21 20 | | Some(&mut self.0)
24 note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 13:1
25 --> $DIR/issue-37884.rs:13:1
27 13 | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {
28 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 error: aborting due to previous error