From 39f79ecb8ead1af6d11a8d874ed4eec845da6205 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 18 Nov 2026 01:19:06 -0800 Subject: [PATCH] replay rt backend: the pass setters reborrow the attachment they set set_attachment! takes its attachment by value, so passing the `&mut` binding moved it before the clear value was set. Lint 45173 caught it (E0382, three times). Each setter now passes `&mut *a`, as the old backend's setters do. Verified: the next lint compiles the validation crate in every cfg. --- .../src/replay/new_runtime/render.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/metal2vulkan-validation/src/replay/new_runtime/render.rs b/crates/metal2vulkan-validation/src/replay/new_runtime/render.rs index eed4eeda0..03decd348 100644 --- a/crates/metal2vulkan-validation/src/replay/new_runtime/render.rs +++ b/crates/metal2vulkan-validation/src/replay/new_runtime/render.rs @@ -286,7 +286,7 @@ impl NewRuntime { None => None, }; let a = &mut self.pass(call.receiver).descriptor.color_attachments[at]; - set_attachment!(set, a); + set_attachment!(set, &mut *a); if let Some(clear) = clear { a.clear_color = clear; } @@ -297,7 +297,7 @@ impl NewRuntime { let set = self.attachment_set(call, &f, rt::MAX_COLOR_ATTACHMENTS)?; let clear = f.float("clearDepth")?; let a = &mut self.pass(call.receiver).descriptor.depth_attachment; - set_attachment!(set, a); + set_attachment!(set, &mut *a); if let Some(clear) = clear { a.clear_depth = clear; } @@ -308,7 +308,7 @@ impl NewRuntime { let set = self.attachment_set(call, &f, rt::MAX_COLOR_ATTACHMENTS + 1)?; let clear = f.count("clearStencil")?; let a = &mut self.pass(call.receiver).descriptor.stencil_attachment; - set_attachment!(set, a); + set_attachment!(set, &mut *a); if let Some(clear) = clear { a.clear_stencil = clear; }