From e72223997e5c9362baab162a90f72de22c80bc5d Mon Sep 17 00:00:00 2001 From: lilly lizard <44878819+lilly-lizard@users.noreply.github.com> Date: Mon, 25 Mar 2024 06:16:37 +1300 Subject: [PATCH] Allow unsized `p_next` arguments for all `push_next` functions (#855) Co-authored-by: Marijn Suijten --- Changelog.md | 1 + ash/src/vk.rs | 2 +- ash/src/vk/definitions.rs | 303 ++++++++++++++++++++++++-------------- generator/src/lib.rs | 2 +- 4 files changed, 198 insertions(+), 110 deletions(-) diff --git a/Changelog.md b/Changelog.md index 1eb4ee999..1a2d402bf 100644 --- a/Changelog.md +++ b/Changelog.md @@ -67,6 +67,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Windows `HANDLE` types (`HWND`, `HINSTANCE`, `HMONITOR`) are now defined as `isize` instead of `*const c_void` (#797) - extensions/ext/ray_tracing_pipeline: Pass indirect SBT regions as single item reference (#829) - Replaced `c_char` array setters with `CStr` setters (#831) +- `push_next()` functions now allow unsized `p_next` argument (#855) ### Removed diff --git a/ash/src/vk.rs b/ash/src/vk.rs index 1d551eea2..1736add56 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -31,7 +31,7 @@ mod platform_types; pub use platform_types::*; /// Iterates through the pointer chain. Includes the item that is passed into the function. /// Stops at the last [`BaseOutStructure`] that has a null [`BaseOutStructure::p_next`] field. -pub(crate) unsafe fn ptr_chain_iter( +pub(crate) unsafe fn ptr_chain_iter( ptr: &mut T, ) -> impl Iterator> { let ptr = <*mut T>::cast::>(ptr); diff --git a/ash/src/vk/definitions.rs b/ash/src/vk/definitions.rs index b40cef56e..318bdc5e1 100644 --- a/ash/src/vk/definitions.rs +++ b/ash/src/vk/definitions.rs @@ -1284,7 +1284,7 @@ impl<'a> DeviceQueueCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -1376,7 +1376,7 @@ impl<'a> DeviceCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -1450,7 +1450,7 @@ impl<'a> InstanceCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -1594,7 +1594,7 @@ impl<'a> MemoryAllocateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -1994,7 +1994,7 @@ impl<'a> WriteDescriptorSet<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -2182,7 +2182,7 @@ impl<'a> BufferCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -2257,7 +2257,7 @@ impl<'a> BufferViewCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -2484,7 +2484,7 @@ impl<'a> BufferMemoryBarrier<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -2580,7 +2580,7 @@ impl<'a> ImageMemoryBarrier<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -2707,7 +2707,7 @@ impl<'a> ImageCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -2828,7 +2828,7 @@ impl<'a> ImageViewCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -3137,7 +3137,7 @@ impl<'a> BindSparseInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -3434,7 +3434,7 @@ impl<'a> ShaderModuleCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -3545,7 +3545,10 @@ impl<'a> DescriptorSetLayoutCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -3630,7 +3633,10 @@ impl<'a> DescriptorPoolCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -3687,7 +3693,10 @@ impl<'a> DescriptorSetAllocateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -3835,7 +3844,10 @@ impl<'a> PipelineShaderStageCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -3910,7 +3922,10 @@ impl<'a> ComputePipelineCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -4129,7 +4144,7 @@ impl<'a> PipelineVertexInputStateCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -4232,7 +4247,7 @@ impl<'a> PipelineTessellationStateCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -4312,7 +4327,10 @@ impl<'a> PipelineViewportStateCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -4429,7 +4447,7 @@ impl<'a> PipelineRasterizationStateCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -4530,7 +4548,7 @@ impl<'a> PipelineMultisampleStateCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -4668,7 +4686,7 @@ impl<'a> PipelineColorBlendStateCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -5038,7 +5056,10 @@ impl<'a> GraphicsPipelineCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -5368,7 +5389,7 @@ impl<'a> SamplerCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -5535,7 +5556,10 @@ impl<'a> CommandBufferInheritanceInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -5592,7 +5616,7 @@ impl<'a> CommandBufferBeginInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -5676,7 +5700,7 @@ impl<'a> RenderPassBeginInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -6052,7 +6076,7 @@ impl<'a> RenderPassCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -6099,7 +6123,7 @@ impl<'a> EventCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -6146,7 +6170,7 @@ impl<'a> FenceCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -7508,7 +7532,7 @@ impl<'a> SemaphoreCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -7576,7 +7600,7 @@ impl<'a> QueryPoolCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -7666,7 +7690,7 @@ impl<'a> FramebufferCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -7891,7 +7915,7 @@ impl<'a> SubmitInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -8932,7 +8956,7 @@ impl<'a> SwapchainCreateInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -9008,7 +9032,7 @@ impl<'a> PresentInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -10823,7 +10847,10 @@ impl<'a> PhysicalDeviceFeatures2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -10870,7 +10897,10 @@ impl<'a> PhysicalDeviceProperties2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -10917,7 +10947,7 @@ impl<'a> FormatProperties2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -10967,7 +10997,7 @@ impl<'a> ImageFormatProperties2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -11042,7 +11072,10 @@ impl<'a> PhysicalDeviceImageFormatInfo2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -11092,7 +11125,7 @@ impl<'a> QueueFamilyProperties2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -11139,7 +11172,10 @@ impl<'a> PhysicalDeviceMemoryProperties2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -11681,7 +11717,7 @@ impl<'a> PhysicalDeviceExternalBufferInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -12384,7 +12420,7 @@ impl<'a> PhysicalDeviceExternalSemaphoreInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -13749,7 +13785,7 @@ impl<'a> BindBufferMemoryInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -13846,7 +13882,7 @@ impl<'a> BindImageMemoryInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -15375,7 +15411,10 @@ impl<'a> PhysicalDeviceSurfaceInfo2KHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -15422,7 +15461,10 @@ impl<'a> SurfaceCapabilities2KHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -15469,7 +15511,7 @@ impl<'a> SurfaceFormat2KHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -15940,7 +15982,10 @@ impl<'a> ImageMemoryRequirementsInfo2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -16058,7 +16103,7 @@ impl<'a> MemoryRequirements2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -16449,7 +16494,7 @@ impl<'a> SamplerYcbcrConversionCreateInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -18298,7 +18343,10 @@ impl<'a> DescriptorSetLayoutSupport<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -19313,7 +19361,7 @@ impl<'a> DebugUtilsMessengerCallbackDataEXT<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -20701,7 +20749,7 @@ impl<'a> AttachmentDescription2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -20762,7 +20810,7 @@ impl<'a> AttachmentReference2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -20874,7 +20922,7 @@ impl<'a> SubpassDescription2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -20970,7 +21018,7 @@ impl<'a> SubpassDependency2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -21057,7 +21105,7 @@ impl<'a> RenderPassCreateInfo2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -21129,7 +21177,7 @@ impl<'a> SubpassEndInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -21702,7 +21750,7 @@ impl<'a> AndroidHardwareBufferPropertiesANDROID<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -24425,7 +24473,10 @@ impl<'a> RayTracingPipelineCreateInfoNV<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -24547,7 +24598,10 @@ impl<'a> RayTracingPipelineCreateInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -24880,7 +24934,7 @@ impl<'a> AccelerationStructureCreateInfoNV<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -32722,7 +32776,7 @@ impl<'a> AccelerationStructureGeometryTrianglesDataKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -33129,7 +33183,7 @@ impl<'a> AccelerationStructureCreateInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -34883,7 +34937,7 @@ impl<'a> PhysicalDeviceClusterCullingShaderFeaturesHUAWEI<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -35097,7 +35151,7 @@ impl<'a> ImageBlit2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -35179,7 +35233,7 @@ impl<'a> BufferImageCopy2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -35436,7 +35490,7 @@ impl<'a> BlitImageInfo2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -36988,7 +37042,7 @@ impl<'a> ImageMemoryBarrier2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -37091,7 +37145,7 @@ impl<'a> BufferMemoryBarrier2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -37266,7 +37320,10 @@ impl<'a> CommandBufferSubmitInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -37352,7 +37409,7 @@ impl<'a> SubmitInfo2<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -38418,7 +38475,7 @@ impl<'a> PhysicalDeviceVideoFormatInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -38563,7 +38620,7 @@ impl<'a> VideoProfileInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -38672,7 +38729,7 @@ impl<'a> VideoCapabilitiesKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -38874,7 +38931,10 @@ impl<'a> VideoReferenceSlotInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -39039,7 +39099,7 @@ impl<'a> VideoDecodeInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -39974,7 +40034,10 @@ impl<'a> VideoSessionCreateInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -40038,7 +40101,7 @@ impl<'a> VideoSessionParametersCreateInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -40088,7 +40151,7 @@ impl<'a> VideoSessionParametersUpdateInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -40142,7 +40205,7 @@ impl<'a> VideoEncodeSessionParametersGetInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -40193,7 +40256,7 @@ impl<'a> VideoEncodeSessionParametersFeedbackInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -40270,7 +40333,10 @@ impl<'a> VideoBeginCodingInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -40349,7 +40415,10 @@ impl<'a> VideoCodingControlInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -40505,7 +40574,7 @@ impl<'a> VideoEncodeInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -40676,7 +40745,7 @@ impl<'a> VideoEncodeQualityLevelPropertiesKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -40818,7 +40887,7 @@ impl<'a> VideoEncodeRateControlLayerInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -43712,7 +43781,10 @@ impl<'a> DescriptorBufferBindingInfoEXT<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -46069,7 +46141,7 @@ impl<'a> RenderingInfo<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -47385,7 +47457,7 @@ impl<'a> SubresourceLayout2KHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -48767,7 +48839,10 @@ impl<'a> ExportMetalObjectsInfoEXT<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -50146,7 +50221,10 @@ impl<'a> OpticalFlowSessionCreateInfoNV<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -50675,7 +50753,7 @@ impl<'a> DepthBiasInfoEXT<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -52052,7 +52130,7 @@ impl<'a> MemoryMapInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -52286,7 +52364,7 @@ impl<'a> ShaderCreateInfoEXT<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -52491,7 +52569,10 @@ impl<'a> ScreenBufferPropertiesQNX<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*mut T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -53024,7 +53105,7 @@ impl<'a> ExecutionGraphPipelineCreateInfoAMDX<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -53302,7 +53383,10 @@ impl<'a> BindDescriptorSetsInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -53373,7 +53457,7 @@ impl<'a> PushConstantsInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -53444,7 +53528,10 @@ impl<'a> PushDescriptorSetInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next( + mut self, + next: &'a mut T, + ) -> Self { unsafe { let next_ptr = <*const T>::cast(next); let last_next = ptr_chain_iter(next).last().unwrap(); @@ -53515,7 +53602,7 @@ impl<'a> PushDescriptorSetWithTemplateInfoKHR<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -53597,7 +53684,7 @@ impl<'a> SetDescriptorBufferOffsetsInfoEXT<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { @@ -53662,7 +53749,7 @@ impl<'a> BindDescriptorBufferEmbeddedSamplersInfoEXT<'a> { #[doc = r" valid extension structs can be pushed into the chain."] #[doc = r" If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the"] #[doc = r" chain will look like `A -> D -> B -> C`."] - pub fn push_next( + pub fn push_next( mut self, next: &'a mut T, ) -> Self { diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 949fa129f..75d176219 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -2220,7 +2220,7 @@ fn derive_getters_and_setters( /// valid extension structs can be pushed into the chain. /// If the chain looks like `A -> B -> C`, and you call `x.push_next(&mut D)`, then the /// chain will look like `A -> D -> B -> C`. - pub fn push_next(mut self, next: &'a mut T) -> Self { + pub fn push_next(mut self, next: &'a mut T) -> Self { unsafe { let next_ptr = <*#mutability T>::cast(next); // `next` here can contain a pointer chain. This means that we must correctly