Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
650
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'de` due to conflicting requirements
  2. --> learning-rust.rs:13:3
  3. |
  4. 13 | a: &'a std::path::Path,
  5. | ^
  6. |
  7. note: first, the lifetime cannot outlive the lifetime 'de as defined on the impl at 11:10...
  8. --> learning-rust.rs:11:10
  9. |
  10. 11 | #[derive(Deserialize)]
  11. | ^^^^^^^^^^^
  12. = note: ...so that the types are compatible:
  13. expected _IMPL_DESERIALIZE_FOR_A::_serde::de::SeqAccess<'_>
  14. found _IMPL_DESERIALIZE_FOR_A::_serde::de::SeqAccess<'de>
  15. note: but, the lifetime must be valid for the lifetime 'a as defined on the impl at 12:10...
  16. --> learning-rust.rs:12:10
  17. |
  18. 12 | struct A<'a> {
  19. | ^^
  20. = note: ...so that the types are compatible:
  21. expected _IMPL_DESERIALIZE_FOR_A::_serde::Deserialize<'_>
  22. found _IMPL_DESERIALIZE_FOR_A::_serde::Deserialize<'_>
  23.  
  24. error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'de` due to conflicting requirements
  25. --> learning-rust.rs:13:3
  26. |
  27. 13 | a: &'a std::path::Path,
  28. | ^
  29. |
  30. note: first, the lifetime cannot outlive the lifetime 'de as defined on the impl at 11:10...
  31. --> learning-rust.rs:11:10
  32. |
  33. 11 | #[derive(Deserialize)]
  34. | ^^^^^^^^^^^
  35. = note: ...so that the types are compatible:
  36. expected _IMPL_DESERIALIZE_FOR_A::_serde::de::MapAccess<'_>
  37. found _IMPL_DESERIALIZE_FOR_A::_serde::de::MapAccess<'de>
  38. note: but, the lifetime must be valid for the lifetime 'a as defined on the impl at 12:10...
  39. --> learning-rust.rs:12:10
  40. |
  41. 12 | struct A<'a> {
  42. | ^^
  43. = note: ...so that the types are compatible:
  44. expected _IMPL_DESERIALIZE_FOR_A::_serde::Deserialize<'_>
  45. found _IMPL_DESERIALIZE_FOR_A::_serde::Deserialize<'_>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement