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.
This commit is contained in:
Anees Iqbal committed 2026-11-21 02:13:24 -08:00
1 parent fe1e8780a2
commit 8a36a49453
1 file changed
+4 -3
@@ -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;
};