From f4161189fa224754f720bbf314636ef5e1992406 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 8 Dec 2023 11:46:07 -0800 Subject: [PATCH] [naga wgsl-in] Relax arg type for `automatic_conversion_consensus`. --- naga/src/front/wgsl/lower/conversion.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/naga/src/front/wgsl/lower/conversion.rs b/naga/src/front/wgsl/lower/conversion.rs index 6e97e9dcbd..82cd0573e1 100644 --- a/naga/src/front/wgsl/lower/conversion.rs +++ b/naga/src/front/wgsl/lower/conversion.rs @@ -214,13 +214,17 @@ impl<'source, 'temp, 'out> super::ExpressionContext<'source, 'temp, 'out> { /// considers their leaf scalar types. This means it may return `Ok` /// even when the Naga validator will reject the resulting /// construction expression later. - pub fn automatic_conversion_consensus( + pub fn automatic_conversion_consensus<'handle, I>( &self, - components: &[Handle], - ) -> Result { + components: I, + ) -> Result + where + I: IntoIterator>, + I::IntoIter: Clone, // for debugging + { let types = &self.module.types; let mut inners = components - .iter() + .into_iter() .map(|&c| self.typifier()[c].inner_with(types)); log::debug!( "wgsl automatic_conversion_consensus: {:?}",