Skip to content

Commit ebb3f83

Browse files
committed
fix compilation
1 parent a8cffb2 commit ebb3f83

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
@@ -3062,7 +3062,8 @@ where
30623062
return Err(e);
30633063
}
30643064
assert!(valid == N);
3065-
Ok(unsafe { core::mem::transmute::<_, Self>(result) })
3065+
// this is a copy of array_assume_init from stdlib to avoid requiring nightly
3066+
Ok(unsafe { (&result as *const _ as *const [T; N]).read() })
30663067
}
30673068

30683069
fn linear_lift_from_memory(
@@ -3102,7 +3103,8 @@ where
31023103
return Err(e);
31033104
}
31043105
assert!(valid == N);
3105-
Ok(unsafe { core::mem::transmute::<_, Self>(result) })
3106+
// this is a copy of array_assume_init from stdlib to avoid requiring nightly
3107+
Ok(unsafe { (&result as *const _ as *const [T; N]).read() })
31063108
}
31073109
}
31083110

0 commit comments

Comments
 (0)