fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

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