]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-37884.stderr
Rollup merge of #92942 - Xaeroxe:raw_arg, r=dtolnay
[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 LL | |
6 LL | |
7 LL | |     {
8 LL | |         Some(&mut self.0)
9 LL | |     }
10    | |_____^ lifetime mismatch
11    |
12    = note: expected fn pointer `fn(&mut RepeatMut<'a, T>) -> Option<_>`
13               found fn pointer `fn(&'a mut RepeatMut<'a, T>) -> Option<_>`
14 note: the anonymous lifetime #1 defined here...
15   --> $DIR/issue-37884.rs:6:5
16    |
17 LL |     fn next(&'a mut self) -> Option<Self::Item>
18    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 note: ...does not necessarily outlive the lifetime `'a` as defined here
20   --> $DIR/issue-37884.rs:3:6
21    |
22 LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {
23    |      ^^
24
25 error: aborting due to previous error
26
27 For more information about this error, try `rustc --explain E0308`.