mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2025-04-14 21:27:49 +00:00
Enable and fix rust_2024_incompatible_pat
lint (#2631)
This commit is contained in:
parent
bdfc34ccd3
commit
909096db31
@ -85,6 +85,7 @@ ron = "0.8"
|
||||
rust.missing_docs = "allow" # TODO: warn eventually
|
||||
rust.rust_2018_idioms = { level = "warn", priority = -1 }
|
||||
rust.rust_2024_compatibility = { level = "allow", priority = -1 } # TODO: warn eventually
|
||||
rust.rust_2024_incompatible_pat = "warn"
|
||||
rust.unsafe_op_in_unsafe_fn = "warn"
|
||||
clippy.borrow_as_ptr = "warn"
|
||||
clippy.missing_safety_doc = "allow" # TODO: warn eventually
|
||||
|
@ -395,7 +395,7 @@ impl Default for WindowResizeConstraints {
|
||||
impl WindowResizeConstraints {
|
||||
#[must_use]
|
||||
pub fn check_constraints(&self) -> Self {
|
||||
let WindowResizeConstraints {
|
||||
let &WindowResizeConstraints {
|
||||
mut min_width,
|
||||
mut min_height,
|
||||
mut max_width,
|
||||
|
@ -626,14 +626,14 @@ fn add_build_geometry_resources(
|
||||
used_resources: &mut Vec<(ResourceUseRef2, Resource)>,
|
||||
info: &AccelerationStructureBuildGeometryInfo,
|
||||
) {
|
||||
let &AccelerationStructureBuildGeometryInfo {
|
||||
let AccelerationStructureBuildGeometryInfo {
|
||||
flags: _,
|
||||
ref mode,
|
||||
ref dst_acceleration_structure,
|
||||
ref geometries,
|
||||
ref scratch_data,
|
||||
mode,
|
||||
dst_acceleration_structure,
|
||||
geometries,
|
||||
scratch_data,
|
||||
_ne: _,
|
||||
} = &info;
|
||||
} = info;
|
||||
|
||||
match geometries {
|
||||
AccelerationStructureGeometries::Triangles(geometries) => {
|
||||
|
@ -1621,7 +1621,7 @@ impl RecordingCommandBuffer {
|
||||
}
|
||||
|
||||
for (rect_index, rect) in rects.iter().enumerate() {
|
||||
let ClearRect {
|
||||
let &ClearRect {
|
||||
offset: _,
|
||||
extent,
|
||||
ref array_layers,
|
||||
|
@ -211,11 +211,11 @@ impl Default for CommandBufferBeginInfo {
|
||||
|
||||
impl CommandBufferBeginInfo {
|
||||
pub(crate) fn validate(&self, device: &Device) -> Result<(), Box<ValidationError>> {
|
||||
let &Self {
|
||||
let Self {
|
||||
usage: _,
|
||||
ref inheritance_info,
|
||||
inheritance_info,
|
||||
_ne: _,
|
||||
} = &self;
|
||||
} = self;
|
||||
|
||||
if let Some(inheritance_info) = &inheritance_info {
|
||||
inheritance_info
|
||||
|
@ -2356,7 +2356,7 @@ impl ImageFormatProperties {
|
||||
|
||||
if let Some(val_vk) = external_vk {
|
||||
let ash::vk::ExternalImageFormatProperties {
|
||||
ref external_memory_properties,
|
||||
external_memory_properties,
|
||||
..
|
||||
} = val_vk;
|
||||
|
||||
@ -2620,7 +2620,7 @@ impl SparseImageMemoryRequirements {
|
||||
|
||||
pub(crate) fn from_vk2(val_vk: &ash::vk::SparseImageMemoryRequirements2<'_>) -> Self {
|
||||
let ash::vk::SparseImageMemoryRequirements2 {
|
||||
ref memory_requirements,
|
||||
memory_requirements,
|
||||
..
|
||||
} = val_vk;
|
||||
|
||||
|
@ -312,12 +312,12 @@ impl ComputePipelineCreateInfo {
|
||||
}));
|
||||
}
|
||||
|
||||
let &PipelineShaderStageCreateInfo {
|
||||
let PipelineShaderStageCreateInfo {
|
||||
flags: _,
|
||||
ref entry_point,
|
||||
required_subgroup_size: _vk,
|
||||
entry_point,
|
||||
required_subgroup_size: _,
|
||||
_ne: _,
|
||||
} = &stage;
|
||||
} = stage;
|
||||
|
||||
let entry_point_info = entry_point.info();
|
||||
|
||||
|
@ -1618,8 +1618,8 @@ impl GraphicsPipelineCreateInfo {
|
||||
|
||||
if let Some(viewport_state) = viewport_state {
|
||||
let ViewportState {
|
||||
ref viewports,
|
||||
ref scissors,
|
||||
viewports,
|
||||
scissors,
|
||||
_ne: _,
|
||||
} = viewport_state;
|
||||
|
||||
|
@ -310,7 +310,7 @@ impl Spirv {
|
||||
let id_info = ids.get_mut(&target).unwrap();
|
||||
|
||||
match instruction {
|
||||
Instruction::Decorate { ref decoration, .. } => {
|
||||
Instruction::Decorate { decoration, .. } => {
|
||||
let instruction = Instruction::Decorate {
|
||||
target,
|
||||
decoration: decoration.clone(),
|
||||
@ -318,7 +318,7 @@ impl Spirv {
|
||||
id_info.decorations.push(instruction.clone());
|
||||
instruction
|
||||
}
|
||||
Instruction::DecorateId { ref decoration, .. } => {
|
||||
Instruction::DecorateId { decoration, .. } => {
|
||||
let instruction = Instruction::DecorateId {
|
||||
target,
|
||||
decoration: decoration.clone(),
|
||||
@ -351,7 +351,7 @@ impl Spirv {
|
||||
[member as usize];
|
||||
|
||||
match instruction {
|
||||
Instruction::Decorate { ref decoration, .. } => {
|
||||
Instruction::Decorate { decoration, .. } => {
|
||||
let instruction = Instruction::MemberDecorate {
|
||||
structure_type,
|
||||
member,
|
||||
|
@ -2227,7 +2227,7 @@ impl SwapchainCreateInfo {
|
||||
|
||||
let (image_sharing_mode_vk, queue_family_indices_vk) = match image_sharing {
|
||||
Sharing::Exclusive => (ash::vk::SharingMode::EXCLUSIVE, [].as_slice()),
|
||||
Sharing::Concurrent(ref ids) => (ash::vk::SharingMode::CONCURRENT, ids.as_slice()),
|
||||
Sharing::Concurrent(ids) => (ash::vk::SharingMode::CONCURRENT, ids.as_slice()),
|
||||
};
|
||||
|
||||
let mut val_vk = ash::vk::SwapchainCreateInfoKHR::default()
|
||||
|
Loading…
Reference in New Issue
Block a user