Skip to content

Commit 561697e

Browse files
committed
fix compilation
1 parent 81f348f commit 561697e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • crates/wasmtime/src/runtime/component/func

crates/wasmtime/src/runtime/component/func/typed.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2958,7 +2958,8 @@ where
29582958
return Err(e);
29592959
}
29602960
assert!(valid == N);
2961-
Ok(unsafe { core::mem::transmute::<_, Self>(result) })
2961+
// this is a copy of array_assume_init from stdlib to avoid requiring nightly
2962+
Ok(unsafe { (&result as *const _ as *const [T; N]).read() })
29622963
}
29632964

29642965
fn linear_lift_from_memory(
@@ -2998,7 +2999,8 @@ where
29982999
return Err(e);
29993000
}
30003001
assert!(valid == N);
3001-
Ok(unsafe { core::mem::transmute::<_, Self>(result) })
3002+
// this is a copy of array_assume_init from stdlib to avoid requiring nightly
3003+
Ok(unsafe { (&result as *const _ as *const [T; N]).read() })
30023004
}
30033005
}
30043006

0 commit comments

Comments
 (0)