]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-37884.stderr
Rollup merge of #98200 - ouz-a:issue-98177, r=oli-obk
[rust.git] / src / test / ui / issues / issue-37884.stderr
1 error[E0308]: method not compatible with trait
2   --> $DIR/issue-37884.rs:6:5
3    |
4 LL |     fn next(&'a mut self) -> Option<Self::Item>
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
6    |
7    = note: expected fn pointer `fn(&mut RepeatMut<'a, T>) -> Option<_>`
8               found fn pointer `fn(&'a mut RepeatMut<'a, T>) -> Option<_>`
9 note: the anonymous lifetime as defined here...
10   --> $DIR/issue-37884.rs:6:5
11    |
12 LL |     fn next(&'a mut self) -> Option<Self::Item>
13    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 note: ...does not necessarily outlive the lifetime `'a` as defined here
15   --> $DIR/issue-37884.rs:3:6
16    |
17 LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {
18    |      ^^
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0308`.