blob: 703cdf0854808c5359fd476da3ad339a2d166e21 [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 fn pointer `fn(&mut RepeatMut<'a, T>) -> std::option::Option<_>`
found fn pointer `fn(&'a mut RepeatMut<'a, T>) -> std::option::Option<_>`
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`.