From 8a36a49453f451a9bc8f6bd80ac957b409fd424d Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sat, 21 Nov 2026 02:13:24 -0800 Subject: [PATCH] rt tests: argument_sampling imports HeapRange inside its GPU hazard (fix forward of 2d0c57661d) What: the hazard test's one import of HeapRange moves from the module's import list into the test. Why: under --cfg m2v_gpu without m2v_gpu_hazards the test is compiled out, so the module-level import was unused and clippy -D warnings failed. That was the gate of 39b0efc6e7 (as 39b0efc6e7), job m3-max-62653: clippy_gpu red; fmt, signatures --check, clippy (all features), clippy under m2v_cpu_icd, workspace doc, rt tests and lavapipe (541 passed) green. The hazard archive builds, under both cfgs, compiled it. Verified: cargo fmt; clippy under --cfg m2v_gpu and under m2v_cpu_icd in the job this commit's report names. --- crates/metal2vulkan-runtime/src/tests/argument_sampling.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/tests/argument_sampling.rs b/crates/metal2vulkan-runtime/src/tests/argument_sampling.rs index 341452540..bc16c4273 100644 --- a/crates/metal2vulkan-runtime/src/tests/argument_sampling.rs +++ b/crates/metal2vulkan-runtime/src/tests/argument_sampling.rs @@ -18,9 +18,9 @@ mod on_device { use crate::tests::command::on_device::{each_device, finished}; use crate::{ Block, Buffer, ComputePipelineDescriptor, ComputePipelineState, Device, DispatchType, - FunctionDescriptor, HeapRange, IndexClass, Library, MemoryClass, NumberedSampler, - PixelFormat, Region, Resource, ResourceUsage, SamplerDescriptor, StageSource, Texture, - TextureDescriptor, TextureType, TextureUsage, + FunctionDescriptor, IndexClass, Library, MemoryClass, NumberedSampler, PixelFormat, Region, + Resource, ResourceUsage, SamplerDescriptor, StageSource, Texture, TextureDescriptor, + TextureType, TextureUsage, }; use metal2vulkan_devtools::{fixtures_dir, llvm_assemble, AssembleError}; @@ -246,6 +246,7 @@ mod on_device { use crate::tests::command::on_device::shared_event; use crate::tests::compute::on_device::step; use crate::tests::gpu_span::on_device::{dispatches_for, long, words, WORDS}; + use crate::HeapRange; let Some(library) = library("examples/heap_samples.ll") else { return; };