]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-37884.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / issues / issue-37884.stderr
CommitLineData
ff7c6d11 1error[E0308]: method not compatible with trait
0731742a 2 --> $DIR/issue-37884.rs:6:5
ff7c6d11 3 |
0531ce1d 4LL | / fn next(&'a mut self) -> Option<Self::Item>
532ac7d7
XL
5LL | |
6LL | |
0531ce1d
XL
7LL | | {
8LL | | Some(&mut self.0)
9LL | | }
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
14note: the anonymous lifetime #1 defined on the method body at 6:5...
15 --> $DIR/issue-37884.rs:6:5
ff7c6d11 16 |
0531ce1d 17LL | / fn next(&'a mut self) -> Option<Self::Item>
532ac7d7
XL
18LL | |
19LL | |
0531ce1d
XL
20LL | | {
21LL | | Some(&mut self.0)
22LL | | }
ff7c6d11 23 | |_____^
e74abb32 24note: ...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 27LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {
8faf50e0 28 | ^^
ff7c6d11
XL
29
30error: aborting due to previous error
31
0531ce1d 32For more information about this error, try `rustc --explain E0308`.