Fix importing static values of non-JS types

This hasn't ever actually worked in `wasm-bindgen` but there's been
enough refactorings since the initial implementation that it's actually
quite trivial to implement now!

Closes #1777
This commit is contained in:
Alex Crichton
2019-09-23 08:23:21 -07:00
parent e809a45c61
commit 0afb6aafd3
4 changed files with 24 additions and 1 deletions

View File

@ -1162,6 +1162,14 @@ impl ToTokens for ast::ImportStatic {
};
})
.to_tokens(into);
Descriptor(
&shim_name,
quote! {
<#ty as WasmDescribe>::describe();
},
)
.to_tokens(into);
}
}