Don't warn about unused mut in tests when "validate" feature is off. (#2466)

This commit is contained in:
Jim Blandy authored and GitHub committed 2023-09-11 11:59:14 +02:00
1 parent a0eb1f5462
commit cc87b8f9eb
1 file changed
+1
+1
View File
@@ -614,6 +614,7 @@ impl super::Validator {
return Err(EntryPointError::UnexpectedWorkgroupSize.with_span());
}
#[cfg_attr(not(feature = "validate"), allow(unused_mut))]
let mut info = self
.validate_function(&ep.function, module, mod_info, true)
.map_err(WithSpan::into_other)?;