blob: 8e75d7be066a3f2c2ccac3c2194a4d823f9e8549 [file] [log] [blame]
error[E0308]: method not compatible with trait
--> $DIR/issue-37884.rs:6:5
|
LL | / fn next(&'a mut self) -> Option<Self::Item>
LL | |
LL | |
LL | | {
LL | | Some(&mut self.0)
LL | | }
| |_____^ lifetime mismatch
|
= note: expected type `fn(&mut RepeatMut<'a, T>) -> std::option::Option<&mut T>`
found type `fn(&'a mut RepeatMut<'a, T>) -> std::option::Option<&mut T>`
note: the anonymous lifetime #1 defined on the method body at 6:5...
--> $DIR/issue-37884.rs:6:5
|
LL | / fn next(&'a mut self) -> Option<Self::Item>
LL | |
LL | |
LL | | {
LL | | Some(&mut self.0)
LL | | }
| |_____^
note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 3:6
--> $DIR/issue-37884.rs:3:6
|
LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {
| ^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.