fn Rav1dPictureDataComponentInner::wrap_buf: Attempt to add lifetimes#1317
fn Rav1dPictureDataComponentInner::wrap_buf: Attempt to add lifetimes#1317
fn Rav1dPictureDataComponentInner::wrap_buf: Attempt to add lifetimes#1317Conversation
|
It's not that it needs to outlive Sorry I don't have a solution tonight, gonna get to bed, but I'll think on it. |
Yeah, I realized that. But I don't know how to make the lifetimes exactly the same, or how to not have the lifetime be invariant. But as far as I can tell, the |
…uf` outlives `Self` Adding proper lifetimes is difficult (see #1317), so we instead make this an `unsafe` precondition, that `buf` must outlive the returned `Self`.
I'm struggling to figure out the lifetimes here, even though I think they should work. The
'buflifetime, i.e. the lifetime ofRav1dPictureDataComponentInner::buf, should outlive'a, where'ais in&'a Rav1dPictureDataComponent<'buf>when stored inRav1dPictureDataComponentOffset::data. But things aren't working out. Can anyone else help and figure this out?