diff --git a/lib/compiler-llvm/src/trampoline/wasm.rs b/lib/compiler-llvm/src/trampoline/wasm.rs index d41fcc01f..040b95054 100644 --- a/lib/compiler-llvm/src/trampoline/wasm.rs +++ b/lib/compiler-llvm/src/trampoline/wasm.rs @@ -246,13 +246,17 @@ fn generate_trampoline<'ctx>( .results() .iter() .map(|ty| match ty { - Type::I32 | Type::F32 => 32, - Type::I64 | Type::F64 => 64, - Type::V128 => 128, - Type::AnyRef => unimplemented!("anyref in the llvm backend"), - Type::FuncRef => unimplemented!("funcref in the llvm backend"), + Type::I32 | Type::F32 => Ok(32), + Type::I64 | Type::F64 => Ok(64), + Type::V128 => Ok(128), + ty => { + return Err(CompileError::Codegen(format!( + "generate_trampoline: unimplemented wasm_common type {:?}", + ty + ))) + } }) - .collect::>(); + .collect::, _>>()?; let _is_sret = match func_sig_returns_bitwidths.as_slice() { []