2017-12-10 19:47:55 +00:00
|
|
|
error[E0308]: method not compatible with trait
|
2017-12-10 20:29:24 +00:00
|
|
|
--> $DIR/issue-37884.rs:16:5
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | / fn next(&'a mut self) -> Option<Self::Item>
|
|
|
|
LL | | //~^ ERROR method not compatible with trait
|
|
|
|
LL | | //~| lifetime mismatch
|
|
|
|
LL | | {
|
2018-02-24 23:01:39 +00:00
|
|
|
LL | | Some(&mut self.0)
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | | }
|
2017-12-10 19:47:55 +00:00
|
|
|
| |_____^ lifetime mismatch
|
|
|
|
|
|
|
|
|
= note: expected type `fn(&mut RepeatMut<'a, T>) -> std::option::Option<&mut T>`
|
|
|
|
found type `fn(&'a mut RepeatMut<'a, T>) -> std::option::Option<&mut T>`
|
2017-12-10 20:29:24 +00:00
|
|
|
note: the anonymous lifetime #1 defined on the method body at 16:5...
|
|
|
|
--> $DIR/issue-37884.rs:16:5
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | / fn next(&'a mut self) -> Option<Self::Item>
|
|
|
|
LL | | //~^ ERROR method not compatible with trait
|
|
|
|
LL | | //~| lifetime mismatch
|
|
|
|
LL | | {
|
2018-02-24 23:01:39 +00:00
|
|
|
LL | | Some(&mut self.0)
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | | }
|
2017-12-10 19:47:55 +00:00
|
|
|
| |_____^
|
|
|
|
note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 13:1
|
|
|
|
--> $DIR/issue-37884.rs:13:1
|
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | impl<'a, T: 'a> Iterator for RepeatMut<'a, T> {
|
2018-01-28 21:42:49 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-12-10 19:47:55 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2018-02-19 20:40:25 +00:00
|
|
|
If you want more information on this error, try using "rustc --explain E0308"
|