Skip to content

Commit

Permalink
Fully-qualified names in quote
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaslihotzki committed Sep 26, 2022
1 parent 609ab42 commit 5ea1515
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/backend/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ impl TryToTokens for ast::LinkToModule {
self.0.try_to_tokens(&mut program)?;
let link_function_name = self.0.link_function_name(0);
let name = Ident::new(&link_function_name, Span::call_site());
let abi_ret = quote! { <String as wasm_bindgen::convert::FromWasmAbi>::Abi };
let abi_ret = quote! { <std::string::String as wasm_bindgen::convert::FromWasmAbi>::Abi };
let extern_fn = extern_fn(&name, &[], &[], &[], abi_ret);
(quote! {
{
#program
#extern_fn

unsafe {
<String as wasm_bindgen::convert::FromWasmAbi>::from_abi(#name())
<std::string::String as wasm_bindgen::convert::FromWasmAbi>::from_abi(#name())
}
}
})
Expand Down

0 comments on commit 5ea1515

Please sign in to comment.