Inline some type conversions for ()

The `()` type accidentally wasn't getting its trivial type conversions
inlined because it doesn't actually have any type parameters. This
commit adds `#[inline]` to the relevant functions to ensure that these
get inlined across crates.
This commit is contained in:
Alex Crichton
2021-08-31 08:36:27 -07:00
parent c8f55ed688
commit 230159efa7

View File

@@ -368,6 +368,7 @@ macro_rules! impl_wasm_params {
}
}
#[inline]
fn into_abi(self, _store: &mut StoreOpaque) -> Option<Self::Abi> {
let ($($t,)*) = self;
$(
@@ -446,6 +447,7 @@ macro_rules! impl_wasm_results {
{
type ResultAbi = ($($t::Abi,)*);
#[inline]
unsafe fn from_abi(store: &mut StoreOpaque, abi: Self::ResultAbi) -> Self {
let ($($t,)*) = abi;
($($t::from_abi($t, store),)*)