From 2dde97928f17ff3d34fe6b8b91985a9ba592dfd1 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 23 Nov 2026 00:26:18 -0800 Subject: [PATCH] Tests: the program-scope binding test reads the pruned module's globals through its parts Compile fix for the test of the previous commit: Module has no globals(); the pruned module's parts hold them (job m3-max-70339: E0599 and an unused import). --- crates/metal2vulkan-air/src/canon/tests/global_bindings.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-air/src/canon/tests/global_bindings.rs b/crates/metal2vulkan-air/src/canon/tests/global_bindings.rs index 2717b3eea..dde8c56fd 100644 --- a/crates/metal2vulkan-air/src/canon/tests/global_bindings.rs +++ b/crates/metal2vulkan-air/src/canon/tests/global_bindings.rs @@ -5,7 +5,7 @@ use super::*; use crate::abi::GlobalBinding; use crate::error::Feature; -use crate::ir::{Type, TypeId}; +use crate::ir::Type; /// A global as Apple's compiler writes one for a program-scope binding: a constant of the constant /// space holding a pointer, externally initialized and `undef`. @@ -146,7 +146,7 @@ fn bound_buffers_become_buffer_parameters() { panic!("the entry's type is not a function"); }; assert_eq!(params.len(), 3); - assert_eq!(e.module.globals().len(), 0, "{}", body_text(&e)); + assert_eq!(e.module.parts().globals.len(), 0, "{}", body_text(&e)); let text = body_text(&e); assert!(text.contains("%a1"), "{text}"); assert!(text.contains("%a2"), "{text}");