rust/src/test/ui/issue-37884.stderr

33 lines
1.1 KiB
Plaintext
Raw Normal View History

error[E0308]: method not compatible with trait
--> $DIR/issue-37884.rs:16:5
|
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 | | }
| |_____^ 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>`
note: the anonymous lifetime #1 defined on the method body at 16:5...
--> $DIR/issue-37884.rs:16:5
|
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 | | }
| |_____^
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> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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"