]>
Commit | Line | Data |
---|---|---|
ff7c6d11 | 1 | error[E0308]: method not compatible with trait |
0731742a | 2 | --> $DIR/issue-37884.rs:6:5 |
ff7c6d11 | 3 | | |
0531ce1d | 4 | LL | / fn next(&'a mut self) -> Option<Self::Item> |
532ac7d7 XL |
5 | LL | | |
6 | LL | | | |
0531ce1d XL |
7 | LL | | { |
8 | LL | | Some(&mut self.0) | |
9 | LL | | } | |
ff7c6d11 XL |
10 | | |_____^ lifetime mismatch |
11 | | | |
60c5eb7d XL |
12 | = note: expected fn pointer `fn(&mut RepeatMut<'a, T>) -> std::option::Option<_>` |
13 | found fn pointer `fn(&'a mut RepeatMut<'a, T>) -> std::option::Option<_>` | |
0731742a XL |
14 | note: the anonymous lifetime #1 defined on the method body at 6:5... |
15 | --> $DIR/issue-37884.rs:6:5 | |
ff7c6d11 | 16 | | |
0531ce1d | 17 | LL | / fn next(&'a mut self) -> Option<Self::Item> |
532ac7d7 XL |
18 | LL | | |
19 | LL | | | |
0531ce1d XL |
20 | LL | | { |
21 | LL | | Some(&mut self.0) | |
22 | LL | | } | |
ff7c6d11 | 23 | | |_____^ |
e74abb32 | 24 | note: ...does not necessarily outlive the lifetime `'a` as defined on the impl at 3:6 |
0731742a | 25 | --> $DIR/issue-37884.rs:3:6 |
ff7c6d11 | 26 | | |
0531ce1d | 27 | LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> { |
8faf50e0 | 28 | | ^^ |
ff7c6d11 XL |
29 | |
30 | error: aborting due to previous error | |
31 | ||
0531ce1d | 32 | For more information about this error, try `rustc --explain E0308`. |