Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'de` due to conflicting requirements
- --> learning-rust.rs:13:3
- |
- 13 | a: &'a std::path::Path,
- | ^
- |
- note: first, the lifetime cannot outlive the lifetime 'de as defined on the impl at 11:10...
- --> learning-rust.rs:11:10
- |
- 11 | #[derive(Deserialize)]
- | ^^^^^^^^^^^
- = note: ...so that the types are compatible:
- expected _IMPL_DESERIALIZE_FOR_A::_serde::de::SeqAccess<'_>
- found _IMPL_DESERIALIZE_FOR_A::_serde::de::SeqAccess<'de>
- note: but, the lifetime must be valid for the lifetime 'a as defined on the impl at 12:10...
- --> learning-rust.rs:12:10
- |
- 12 | struct A<'a> {
- | ^^
- = note: ...so that the types are compatible:
- expected _IMPL_DESERIALIZE_FOR_A::_serde::Deserialize<'_>
- found _IMPL_DESERIALIZE_FOR_A::_serde::Deserialize<'_>
- error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'de` due to conflicting requirements
- --> learning-rust.rs:13:3
- |
- 13 | a: &'a std::path::Path,
- | ^
- |
- note: first, the lifetime cannot outlive the lifetime 'de as defined on the impl at 11:10...
- --> learning-rust.rs:11:10
- |
- 11 | #[derive(Deserialize)]
- | ^^^^^^^^^^^
- = note: ...so that the types are compatible:
- expected _IMPL_DESERIALIZE_FOR_A::_serde::de::MapAccess<'_>
- found _IMPL_DESERIALIZE_FOR_A::_serde::de::MapAccess<'de>
- note: but, the lifetime must be valid for the lifetime 'a as defined on the impl at 12:10...
- --> learning-rust.rs:12:10
- |
- 12 | struct A<'a> {
- | ^^
- = note: ...so that the types are compatible:
- expected _IMPL_DESERIALIZE_FOR_A::_serde::Deserialize<'_>
- found _IMPL_DESERIALIZE_FOR_A::_serde::Deserialize<'_>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement