You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extension structs do contain pointers, but their lifetime cannot ever be used if the only pointer they contain is p_next. Structs like this don't actually borrow anything, all structures in a p_next chain are borrowed by the parent. They have no push_next method, and there are no other methods that return Self with a different lifetime than the input struct. Technically you can set the lifetime using the PhantomData member, but that seems a bit silly and pointless.
Cross-posting from #969 (comment): I don't think this issue is actionable if we don't want a breaking release any time such a struct starts being referenced in a new structextends. This is much less likely for ExternalMemoryImageCreateInfo given that it is already part of a chain defined by a parent struct, but very possible for "new" parent structs that are defined with pNext up-front with no extensions available right now, but possibility for extensions in future Vulkan releases.
Extension structs do contain pointers, but their lifetime cannot ever be used if the only pointer they contain is
p_next
. Structs like this don't actually borrow anything, all structures in ap_next
chain are borrowed by the parent. They have nopush_next
method, and there are no other methods that returnSelf
with a different lifetime than the input struct. Technically you can set the lifetime using thePhantomData
member, but that seems a bit silly and pointless.Take
ExternalMemoryImageCreateInfo
for example. It has no methods that borrow data.The text was updated successfully, but these errors were encountered: