Skip to content

Instantly share code, notes, and snippets.

@richo
Created August 23, 2018 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richo/1abb45c90e020eb18efdfeaf27ff5155 to your computer and use it in GitHub Desktop.
Save richo/1abb45c90e020eb18efdfeaf27ff5155 to your computer and use it in GitHub Desktop.
Compiling archiver v0.1.0 (file:///Users/richo/code/ext/archiver)
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter in generic type due to conflicting requirements
--> src/ptp_device.rs:57:5
|
57 | fn next(&mut self) -> Option<GoproFile> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first, the lifetime cannot outlive the lifetime 'c as defined on the impl at 54:1...
--> src/ptp_device.rs:54:1
|
54 | impl<'i, 'c> Iterator for GoproFileIterator<'i, 'c> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...but the lifetime must also be valid for the lifetime 'i as defined on the impl at 54:1...
--> src/ptp_device.rs:54:1
|
54 | impl<'i, 'c> Iterator for GoproFileIterator<'i, 'c> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...so that the types are compatible:
expected std::iter::Iterator
found std::iter::Iterator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment