Skip to content

Commit 072e2b7

Browse files
committed
fix return type of translate_binary
1 parent b5cba8f commit 072e2b7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • crates/wasmi/src/engine/translator/func2

crates/wasmi/src/engine/translator/func2/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ impl FuncTranslator {
11961196
) -> Result<(), Error>
11971197
where
11981198
T: WasmInteger,
1199-
R: Into<TypedVal>,
1199+
R: Into<TypedVal> + Typed,
12001200
{
12011201
bail_unreachable!(self);
12021202
match self.stack.pop2() {
@@ -1208,7 +1208,7 @@ impl FuncTranslator {
12081208
let rhs = T::from(rhs.val());
12091209
let rhs16 = self.make_imm16(rhs)?;
12101210
self.push_instr_with_result(
1211-
<T as Typed>::TY,
1211+
<R as Typed>::TY,
12121212
|result| match rhs16 {
12131213
Operand16::Immediate(rhs) => make_instr_imm16_rhs(result, lhs, rhs),
12141214
Operand16::Reg(rhs) => make_instr(result, lhs, rhs),
@@ -1221,7 +1221,7 @@ impl FuncTranslator {
12211221
let lhs16 = self.make_imm16(lhs)?;
12221222
let rhs = self.layout.operand_to_reg(rhs)?;
12231223
self.push_instr_with_result(
1224-
<T as Typed>::TY,
1224+
<R as Typed>::TY,
12251225
|result| match lhs16 {
12261226
Operand16::Immediate(lhs) => make_instr_imm16_lhs(result, lhs, rhs),
12271227
Operand16::Reg(lhs) => make_instr(result, lhs, rhs),

0 commit comments

Comments
 (0)